Wednesday, April 19, 2006

strip the time portion of the datetime

MS SQL:

select convert(datetime,convert(varchar,getdate(),101))

PostgreSQL:

select now()::date

ANSI SQL: PostgreSQL OK, MS SQL NOT

select cast(now() as date)

0 Comments:

Post a Comment

<< Home