-
March 6th, 2014, 07:42 PM
#1
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.
-
March 7th, 2014, 04:49 PM
#2
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
Last edited by jggtz; March 7th, 2014 at 04:53 PM.
JG
... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|