aeckaren
MIS
- Jul 23, 2012
- 2
Hi all -
My name is Karen and I'm new to the forum. I am evaluating Crystal Reports (14.0.2.364) and like what I have seen so far, but I do have a question that I hope you can help me with. I have a date field that appears as follows:
991231 = December 31, 1999
1001231 = December 31, 2000
I want the date to be converted to something like mm/dd/yyyy, but I haven't been able to find a formula to convert the date correctly. This is what I have so far:
NumberVar input := {OEP70.DTTR70};
If input < 1000101 then Date (2000, 01, 01) else
Date ( Val (ToText (input, 00, "") [2 to 3]),
Val (ToText (input, 0 , "") [4 to 5]),
Val (ToText (input, 0 , "") [6 to 7]) )
This returns an error that the year must be between year 1 and year 9999. Any ideas on how to fix this formula or if I should use something else entirely?
Any help would be greatly appreciated. I have been struggling with this for a few days now!
My name is Karen and I'm new to the forum. I am evaluating Crystal Reports (14.0.2.364) and like what I have seen so far, but I do have a question that I hope you can help me with. I have a date field that appears as follows:
991231 = December 31, 1999
1001231 = December 31, 2000
I want the date to be converted to something like mm/dd/yyyy, but I haven't been able to find a formula to convert the date correctly. This is what I have so far:
NumberVar input := {OEP70.DTTR70};
If input < 1000101 then Date (2000, 01, 01) else
Date ( Val (ToText (input, 00, "") [2 to 3]),
Val (ToText (input, 0 , "") [4 to 5]),
Val (ToText (input, 0 , "") [6 to 7]) )
This returns an error that the year must be between year 1 and year 9999. Any ideas on how to fix this formula or if I should use something else entirely?
Any help would be greatly appreciated. I have been struggling with this for a few days now!