Skip to Content
0
Former Member
Apr 07, 2010 at 03:50 AM

Date Parameter

46 Views

Hi

Appointment Dates in our DB are saved as Numbers. I used the following to convert them to date format in a custom function called @Appt date.

Function (numberVar v2)

local stringvar str;

str:=totext(v2,0,"");

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

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

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

date(tonumber(yy),tonumber(mm),tonumber(dd));

If the date in the database is 20100406 it will appear on my report as 04/06/2010.

My record selection criteria is @Appt Date in {?Begin Date} to {?End Date} . However, Im having some trouble creating a Parameter for Appt Dates as it asks for dates to be entered in the YYYY-MM-DD format.

How can I create a parameter that would help me achieve the above statement.

Any help is greatly appreciated.

Thanks!