Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
gpiva
Starting Member
47 Posts |
Posted - 2004-08-31 : 22:04:49
|
| how can i use the DATEFORMAT in a store procedure ?this is my code CREATE PROCEDURE UpdateTimeTable@ID int,@IToursXrefRoutesId int, @ITransportId int, @DDepartureTime datetime,@DDepartureDate datetime,@DArrivalTime datetime,@DArrivalDate datetimeASSET DATEFORMAT dmyUPDATE TimeTableSET IToursXrefRoutesId = @IToursXrefRoutesId, ITransportId = @ITransportId,DDepartureTime = @DDepartureTime, DDepartureDate = @DDepartureDate, DArrivalTime = @DArrivalTime,DArrivalDate = @DArrivalDate,LastModified = GetDate()WHERE (ITimeTableId = @ID)GOAny help appreciate.Carlo |
|
|
mk_garg20
Constraint Violating Yak Guru
343 Posts |
Posted - 2004-08-31 : 22:30:20
|
| You are setting date usingSET DATEFORMAT dmyWhat you want to know?mk_garg |
 |
|
|
gpiva
Starting Member
47 Posts |
Posted - 2004-08-31 : 22:39:15
|
i run an execute with java jdbc that look like this UpdateTimeTable 6, 8 , 7 , '05/08/2004' , '07/07/2004','11:00:00.00' ,'12:00:00.00' sql server use 08 as a DAY and 05 as MONTHi want to run the same execute but I want to force sql to use 05 as a DAY and 08 as MONTH i try with set dateformat from the query analizer like this set dateformat dmygoUpdateTimeTable 6, 8 , 7 , '05/08/2004' , '07/07/2004','11:00:00.00' ,'12:00:00.00' works fine... I want to implement the dateformat in my storeproci tried with the code that i post but doasnt work...thank you,Carlo. iquote: Originally posted by mk_garg20 You are setting date usingSET DATEFORMAT dmyWhat you want to know?mk_garg
|
 |
|
|
mk_garg20
Constraint Violating Yak Guru
343 Posts |
|
|
gpiva
Starting Member
47 Posts |
|
|
|
|
|
|
|