Need help converting a string field to date in crystal report
HI,
I have a field in my form called {Hosp_Charges_.from_routine} this field is in string and its a date and this filed outputs date like 20110404 I like to turn this field to a date filed like 04/04/2011. can you help please.
Thanks.
Re: Need help converting a string field to date in crystal report
You could use a formula field and write code that:
0 Declare variables
1 Extract the month day & year part of the string, using the MID function
2 Convert to numeric value each one using the TONUMBER function
3 Use the DATE or DATEVALUE or DATESERIAL functions to convert those extracted parts to a date field
4 Place the formula field in the desired section
5 Format as you format a date field