If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > how can i get timestamp with millisconds

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-22-10, 03:56
josemourinho josemourinho is offline
Registered User
 
Join Date: Aug 2010
Posts: 19
how can i get timestamp with millisconds

hello
i use db2 express c
i want to get current timestamp with milliseconds

when i write values (CURRENT TIMESTAMP)
i get 22.10.2010 г. 09:55:47
but i want the milliseconds too
please help
Reply With Quote
  #2 (permalink)  
Old 10-22-10, 06:22
Stealth_DBA Stealth_DBA is offline
Registered User
 
Join Date: May 2009
Posts: 472
josemourinho, what operating system and edition/version of DB2 are you using? Can you supply the exact statement you are using?
Reply With Quote
  #3 (permalink)  
Old 10-22-10, 06:23
nvk@vhv nvk@vhv is offline
Registered User
 
Join Date: Jan 2010
Posts: 294
> db2licm -l
#Product name: "DB2 Express-C"
License type: "Unwarranted"
Expiry date: "Permanent"
Product identifier: "db2expc"
Version information: "9.7"
Max number of CPUs: "2"
Max amount of memory (GB): "2"


> db2 "values (current timestamp)"

1
--------------------------
2010-10-22-12.17.46.204349

1 record(s) selected.
Reply With Quote
  #4 (permalink)  
Old 10-22-10, 10:34
Marcus_A Marcus_A is online now
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
On Windows you will only get:

2010-10-22-12.17.46.204000

Becasue of a limitation of the Windows operating system.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On