Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


AS/400 Sql Get system date

Posted on 2003-02-28
Medium Priority
Last Modified: 2008-02-01
How can I get the system date from a SQL sentece??
Question by:mstriani

Accepted Solution

mglxxx earned 200 total points
ID: 8042071
values current date
works also on iSeries.
If you need a timestamp, use
values current timestamp

If values doesn't work use
select current date from any_table
fetch first row only

any_table can be any table -- on UDB I'd
use syscat.sysdummy, but DB2/400 doesn't have this

Author Comment

ID: 8043953
It works!!!!

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

November 2009 Recently, a question came up in the DB2 forum regarding the date format in DB2 UDB for AS/400.  Apparently in UDB LUW (Linux/Unix/Windows), the date format is a system-wide setting, and is not controlled at the session level.  I'm n…
Recursive SQL in UDB/LUW (you can use 'recursive' and 'SQL' in the same sentence) A growing number of database queries lend themselves to recursive solutions.  It's not always easy to spot when recursion is called for, especially for people una…
Loops Section Overview
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

579 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question