Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

seconds past midnight

Status
Not open for further replies.

hawley

Programmer
Dec 16, 2002
37
US

I have a select statement that is bringing back date values. The problem is I want it in a db2 format. I know how to get the extra seconds past midnight but I need one more zero added on. Does anyone know a way to add an extra 0 to the end?

Here is my select statement:
SELECT DISTINCT
TO_CHAR(strt_tmst, 'YYYY-MM-DD-HH24.MI.SS.SSSSS')
FROM pmt_promo

Here is what is returned:
2003-07-21-00.00.00.00000
Here is what I want to get:
2003-07-21-00.00.00.000000
 
SELECT DISTINCT
TO_CHAR(strt_tmst, 'YYYY-MM-DD-HH24.MI.SS.SSSSS')||'0'
FROM pmt_promo;
 
Thank you very much. Figures it was something that simple.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top