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

Converting number to data

Status
Not open for further replies.

ts04

Technical User
Jun 14, 2004
69
NL
Hi all!

Using CR 9.0

I would like to convert my date field (number) like: 20040714 into a real date field.

How do I do this. I can't seem te get it to work.

Thanx for the help in advance!

Tanja
 
Use a formula that converts the number to text, then pick out the parts of the string to turn it into a Date field:
[tt]
StringVar Temp := totext({Table.NumericDateField}, 0,"");
Date(Val(Temp[1 to 4]), Val(Temp[5 to 6]), Val(Temp[7 to 8]));
[/tt]
-dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top