Solved

DB2 timestamp

Posted on 2004-09-28
1
2,749 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

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

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…
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 video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

808 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