select current date from sysibm.sysdummy1

set :hostdate = current date

Peter

Johnson, Shaunn wrote:
selecting system date / time

Howdy:

Connecting to DB2 OS/390 6.1.2.

How can I select the system date/time and populate that
data into a mock column?  For example, in Oracle, I
can do something like:

[snip]
SQL> select sysdate as today from dual;

TODAY
-------------------
2003-11-04 12:07:16

[/snip]

where 'sysdate' is the timestamp returned from
the system.  How can I do this with DB2?

Thanks!

-X


-- 

===> See you October, 11-14, at IDUG in Prague, Czech Republic <===

+-------------------------------+---------------------------------+
| Peter G Backlund              | Telephone:   08 - 38 69 08      |
| Peter Backlund DB2-Konsult AB | Mobile:     070 - 764 7554      |
| Smastuguvagen 2               | Country Code (Sweden):  46      |
| S-165 72  HASSELBY            |                                 |
| Sweden                        | E-mail:  [EMAIL PROTECTED]  |
+-------------------------------+---------------------------------+
|                   IBM Database GOLD Consultant                  |
+-------------------------------+---------------------------------+
|         Working with DB2 since 1981 ... and forever!            |
+-----------------------------------------------------------------+
- ::: When replying to the list, please use 'Reply-All' and make sure ::: a copy goes to the list ([EMAIL PROTECTED]). *** To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED] *** For more information, check http://www.db2eug.uni.cc

Reply via email to