Solved

DB2 timestamp

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

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…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

816 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

12 Experts available now in Live!

Get 1:1 Help Now