Search...

22 January 2009

SQL - Get Time From datetime Without Seconds.

LEFT(Convert(varchar, fldDate, 8), 5)

The above seems to be about the best way to return the time portion from a datetime field if you need to remove the seconds.

There has to be a neater way of doing it....anyone?

No comments: