maandag, maart 20, 2006

 

formatdate in sql 2000

I had the situation that I needed to return a date in the right format from my recordset directly (old skool), in the olddays with mssaccess this wasnt a problem. With MSSQL its not that easy. I solved the problem with this nice function

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=474&lngWId=5

dbo.FormatDate(GETDATE(), ‘MM/DD/YY HH:NN TT’)

And the result …

03/20/2006 07:15 PM