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

Data time to date conversion in promt

Started by priya@90, 23 Aug 2018 06:11:49 AM

Previous topic - Next topic

priya@90

Hi,

How can convert date-time to dd/mm/yyyy format in my prompt, i have a date column which is having jan 01,2018 12:00:00Am, i wanted to use this as my prompt, it should show dd/mm/yyyy and based on user selection from date and to date (both are using same date column) i wanted to display report output. What i did but it's nor working, any guidance here.

1. i used this function to remove time format cast ([date_col],date) as data item1 this is working and
2. data item 2 used to_char (data item1,'dd/mm/yyyy') this is also working
3. used and display as data item2 in my from date and to_date prompts- this is also working
4. i am trying to restrict data (31/12/2020 data upto here) here  to show in prompt 4 years only and used  condition in my filter [data item2] >31/02/2016 ---this is not working
5. in my main query i have used [data item2] between ?from date? and ?to date?- this is also not working and taking long time to and i don't see any data now

Please any help here to resolve my issue and iam not getting where iam doing wrong here. Please correct me

thanks,
Priya

sdf

#1
Maybe because you are comparing items with different format. CHAR to DATE.
Why don't you try:
timestamp2date ( [date_col] )

Francis aka khayman

use the data format properties to display the date as you wish. this way you do not have to convert the dates and can use date comparison on them easily.