Showing results for 
Search instead for 
Did you mean: 

Date Conversion

Former Member
0 Kudos


Appointment Dates in our DB are saved as Numbers and I'm using Crystal XI to convert them to date format in a formula @Appt date.


Function (numberVar v2)

local stringvar str;


local stringvar dd:=right(str,2);

local stringvar mm:=mid(str,5,2);

local stringvar yy:=left(str,4);


When I use this formula in the report the format is as Month/Day/Year. There is another formula which compares the @apptdate to see if they fall in a specific time period (eg Last month) for which the formula is

{@Appt Date} >= dateserial(year(currentdate),month(currentdate)-1,1) and

{@Appt Date} <= dateserial(year(currentdate),month(currentdate),1)-1

Could someone tell me how this is calculating since the @Apptdate format is Month/Day/Year whereas the Dateserial is Year, Month.

Any help is greatly appreciated.


Edited by: achett13 on Mar 31, 2010 8:48 PM

Edited by: achett13 on Mar 31, 2010 8:49 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I found th eanswer.