Link to home
Start Free TrialLog in
Avatar of Yukiwase
Yukiwase

asked on

Date and Time Conversion from Simple Numeric Fields

We have just started using Crystal Report 9.0 interfacing data using IBM Client Access ODBC for AS400 DB2. We have defined date and time field in simple numeric field such as 20060403 and 1200 for 04/03/06 and 12:00AM respectively.  We would like to show the date and time in converted manner at Crystal Report.  Is there any simple conversion technique to print them without changing AS400 database format?
Please advise me.
ASKER CERTIFIED SOLUTION
Avatar of dylanyee
dylanyee

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of janmarini
janmarini



Another way would be to use this formula field:

to TEST display of the date field using a hard-coded variable:

Local StringVar myDate := "20060403";
totext(cdate(picture(myDate,"xxxx/xx/xx")),"MM/dd/yyyy")

to use your date field the syntax would be:

totext(cdate(picture({yourDateFieldName},"xxxx/xx/xx")),"MM/dd/yyyy")

janmarini's suggestion is better ;)

dylan
glad I could help~

dylan