How to retrieve current date and time in SQL400
There are three ways to retrieve the current date and time in SQL server. First is through CURRENT_TIMESTAMP, GETDATE() & {fn NOW()}.
If you run the following script in Query Analyzer this will give you the same results. If you see execution plan there is no performance difference. It is the same for all the three selected statement.
 SELECT CURRENT_TIMESTAMP
 GO
 SELECT {fn NOW()}
 GO
 SELECT GETDATE()
 GO
Â
or you can make use of this…
SELECT CURDATE() FROM SYSIBM/SYSDUMMY1
Â
SELECT CURDATE() FROM SYSIBM.SYSDUMMY1
Â
In interactive SQL – F13
 last item on page is Naming convention *SYS/*SQL
 *SYS support " / " *SQL support (dot) " . "
Â
SELECT CURTIME() FROM SYSIBM/SYSDUMMY1
Â
SELECT NOW() FROM SYSIBM/SYSDUMMY1 – for both date and time…
Hope this helps.
Jen