If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

How to get Timestamp in specific format

Started by lifzgud, 19 May 2010 07:12:49 AM

Previous topic - Next topic

lifzgud

Hi,
I want a particular timestamp in my report filter.
For eg if the current date returns 18th May 2010
I want it like 2010-05-18 18:30:00.000
Please note that  18:30:00.000 is supposed to be constant.
Only the date would change.

tupac_rd

can you please elaborte how you are planning to use it..

lifzgud

I want to use it in a filter.
the reference column in the table is a date time field.
I want to pick up data only till Saturday 6:30 om for each week.
That is previous Saturday after 6:30 to latest Saturday till 6:30

Gopinath

If the timestamp is constant why can't you just filter based on the date

If the source column is a datetime field try CASTing it to date

mvjcognos

Try with to_char it will show the required format
to_char(sysdate,'YYYY-MM-DD HH:MM:SS) it will show the time also respective to the system

or

if u want time should be constant u can concanate the time with the data item like this...inside a data item
to_char(sysdate,'YYYY-MM-DD')||' '||18:30:00.000