AnsweredAssumed Answered

Custom Function for Date Range with Leading Zeros

Question asked by fmdataweb on Aug 19, 2014
Latest reply on Aug 21, 2014 by robwoof

I've been working with a Custom Function that generates a list of dates based on 2 input dates (start date and end date) as follows:

 

If(

GetAsDate ( EndDate ) > GetAsDate ( StartDate );

GetAsDate ( StartDate ) & ¶ &

DateRange (GetAsDate ( StartDate ) + 1; EndDate );

GetAsDate ( StartDate )

)

 

The list of dates that is returned (in DD/MM/YYYY) format might look as follows:

 

29/09/2014

30/09/2014

1/10/2014

2/10/2014

3/10/2014

 

I need to have the list always show the dates with leading zeros for the day and month, i.e.:

 

29/09/2014

30/09/2014

01/10/2014

02/10/2014

03/10/2014

 

I haven't been able to work this out so far - can anybody help with the required modification to have the date range in DD/MM/YYYY with leading zeros for the DD and MM?

 

thanks,

Steve

Outcomes