
How to convert number format to date format
Hi Kelly,
I'm new to CR too and had the same problem.
Maybe this is not the perfect way to do it, but it works :
WDATE is numeric and contains 20010809
to print it out in a readable way :
ToText ({WDATE} mod 100,"00",0) + "/" + totext(truncate({WDATE} / 100) mod
100,"00",0) + "/" +
totext(truncate({WDATE} / 10000),"0000",0,"")
To compare a date (eg 08/09/2001) with the number in the database, I should
first create a number variable, then create a formula like this : (Year *
10000) + (Month * 100) + Day, giving 20010908.
This field can be compared with your database field.
I have no idea what possibilities CR has to do it in a 'professional' way.
I'm trying to create my first report...
esteban
Quote:
> I am new to CR8.0. If I want to convert the number e.g 20010809 to date
> format such as 09/08/2001, How ?
> If I have a selection criteria for example from date to date, How to do ?
> Coding will be appreciated. Thanks!