Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

getDate() vs {fn Now()}

102 views
Skip to first unread message

Andrea Worley

unread,
Jul 14, 2003, 3:03:38 PM7/14/03
to
I was just curious, is there any difference between getDate
() and { fn Now()}?
Any performance issues?

Anith Sen

unread,
Jul 14, 2003, 3:59:18 PM7/14/03
to
GETDATE() is a T-SQL specific function which returns the current system date
and time. The SQL standard equivalent is CURRENT_TIMESTAMP which is
applicable in T-SQL as well. The {fn Now()} is an ODBC canonical function
which can be used in T-SQL since the OLE DB provider for SQL Server supports
them. There are no notable performance difference between these though. You
can also use canonical format like :

SELECT {fn CURRENT_TIMESTAMP()} AS "date & time",
{fn CURRENT_DATE()} AS "date only",
{fn CURRENT_TIME()} AS "time only" ;

--
- Anith
( Please reply to newsgroups only )


0 new messages