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 > Date to timestamp format

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-16-09, 18:03
Sxvank Sxvank is offline
Registered User
 
Join Date: Nov 2009
Posts: 1
Date to timestamp format

Experts,

I want to change the date to timestamp format in db2 udb datbase table which is running in V8.1 , Please provide me
best possible solution .Its urgent. Please help

thanks in advance,
Reply With Quote
  #2 (permalink)  
Old 11-17-09, 00:13
rahul_s80 rahul_s80 is offline
Registered User
 
Join Date: Jul 2006
Location: Pune , India
Posts: 433
timestamp_iso
__________________
Rahul Singh
Certified DB2 9 DBA / Application Developer
Reply With Quote
  #3 (permalink)  
Old 11-17-09, 01:26
Mathew_paul Mathew_paul is offline
Registered User
 
Join Date: Oct 2007
Posts: 200
select timestamp(colname,'00.00.00') from tbname

regds
Paul
Reply With Quote
  #4 (permalink)  
Old 11-17-09, 10:08
Lenny77 Lenny77 is offline
Registered User
 
Join Date: Jul 2009
Location: NY
Posts: 886
...timestamp(date(col1), current time)...

example:
Quote:
select timestamp(current date, current time) from sysibm.sysdummy1
Lenny
Reply With Quote
  #5 (permalink)  
Old 11-17-09, 12:10
tonkuma tonkuma is offline
Registered User
 
Join Date: Feb 2008
Location: Japan
Posts: 2,193
timestamp_iso may be the simplest. But, the schema is SYSFUN.

DB2 UDB SQL Reference Volume 1 Version 8.2
Chapter 3. Functions

Quote:
Functions overview

Built-in functions are provided with the database manager; they return a single
result value, and are identified as part of the SYSIBM schema. Built-in functions
include column functions (such as AVG), operator functions (such as “+”), casting
functions (such as DECIMAL), and others (such as SUBSTR).

User-defined functions are registered to a database in SYSCAT.ROUTINES (using the
CREATE FUNCTION statement). User-defined functions are never part of the
SYSIBM schema. One such set of functions is provided with the database manager
in a schema called SYSFUN, and another in a schema called SYSPROC.
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