Question : Store date in sql table as yyyy/mm/dd hh:mm:ss using type DATETIME.

I have a sql table with a field called proccessdate (data type is datetime).
In my stored procedure I add records to this table.
When I put the date into the processdate field (getdate() as processdate) the date is put in as   07/14/2010 11:30:15 AM   (mm/dd/yyyy)

How can I get that date stored as  2010/07/14 11:30:15 AM  ?       (yyyy/mm/dd)

Answer : Store date in sql table as yyyy/mm/dd hh:mm:ss using type DATETIME.

BUILD the index it will be in the proper order

create index myindex on mytable as (collectorid asc, processdate desc)

(a datetime is actually held as two floating point numbers 1 containing the number of days since 1/1/1753
and the other the number of "seconds" since midnight)
Random Solutions  
 
programming4us programming4us