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

Change the format of the date

Status
Not open for further replies.

maas

Programmer
Sep 3, 2009
148
BH
Hello Everybody,

I am having a report which has two separate commands which I have created them by adding a SQL command. In the SQL command, I am defining a condition where the cflows.date <= to_char('20090131','yyyymmdd').
Now, the problem is that I want to add a parameter to the command in crystal and replace the to_char('20090131','yyyymmdd')with a date which will be prompted by the user {?end_date}, but it is not accepting because the format is different. If I change the format of the parameter to number, it will accept. But, if the type is date, it will show an error.

So, how can I deal with this issue.

Thanks
 
Try:

to_date(cflows.date) <= {?date}

...using a date parameter.

-LB
 
Hello lbass,

It did not work .... an error is showing that it can not be converted to type of date
 
Is it already a date? What happens if you just use:

cflows.date <= {?date}

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top