Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

modify time in datetime

Status
Not open for further replies.

tek2002

Programmer
Aug 21, 2001
67
US
i have a column named trandate that is of datatype datetime and i need to do a sum function - grouping with several columns inluding the trandate column.

my numbers are off because of the time portion in the
trandate column so i was wondering if there was a way
to convert the time portion to all zero's.

2003-01-21 08:29:14.000 --> 2003-01-21 00:00:00.000

is there a way to do this conversion? this would solve my problem when using the sum function.

thanks for your help.
 
Thanks Much - Works Great!

never used the style parameter before.
 
In the help menu do a search for 'cast and convert' and that is everything you need to convert a date to any style you want.

There are still other ways besides this and if they don't help you just reply to this post.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top