Solved

DB2 timestamp

Posted on 2004-09-28
1
2,747 Views
Last Modified: 2008-03-06
How do I place a timestamp into DB2 using sql?
0
Comment
Question by:gdlp2004
1 Comment
 
LVL 3

Accepted Solution

by:
granbajo earned 250 total points
ID: 12177511
 The "current timestamp" register should do the trick (details on the SQL Reference)  Once you are connected to a database just type this from the prompt:

db2 values current timestamp

  If what you want to do is insert it as a value for a column do this:

INSERT INTO mytable (timestampColumn, otherColumn)
  VALUES (CURRENT TIMESTAMP, someValue)...

  Hope this helps!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
OPENQUERY not recognizing valid table names 6 403
How to use a CTE in a DB2 user defined function 6 107
RPG Free Prototypes using  *LDA data 5 168
Getting missing rows 16 48
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 (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

863 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

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now