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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date / Time format

Status
Not open for further replies.

SerialNinja

Programmer
Sep 30, 2005
2
US
I'm using impromptu reports, I have a date/time field I need to group by and trunc the time
from '2001-12-15 23:50:26'
to just showing the date'2001-12-15'
Any ideas?
Im drawing a blank for some reason.

Thanks
 
Which database are you using ??

With ORACLE:
If you do a trunc([DATETIME]) this will return a simple date without the time

select trunc(sysdate), sysdate from dual;

it returns :
17/01/2006 17/01/2006 11:04:22


In Impromptu, you can use the function Datetime-to-date. This is a Cognos function so might not give the best performance.

If I remember correctly for DB2 you can use CAST( ) .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top