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!

Date/Time to Time Only

Status
Not open for further replies.

itprsn

MIS
Jan 6, 2004
40
US
I have a date/time field with the following data as an example: '4/8/2008 12:03:14 AM'. I need the correct syntax to select just the time in this field. Can anyone help? Thanks...
 
Look in BOL at the Convert function, in particular the Style argument.

Paul
MS Access MVP 2007/2008
 
just the time:
Code:
select datetimefield - datediff(dd, 0, datetimefield)

[COLOR=black #e0e0e0]For SQL and technical ideas, visit my blog, Squared Thoughts.

[sub]The best part about anything that has cheese is the cheese.[/sub][/color]
 
Did you see my answer? If you run a speed test on the convert functions vs. my datediff solution you'll find the convert functions are substantially slower.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top