Solved

DB2 timestamp

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

707 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

14 Experts available now in Live!

Get 1:1 Help Now