susanna123
Technical User
I found this code for date ranges to choose from one one of the forums (see bottom) but I would like to have it so I can choose the dates using a calendar picker.
How can i modify this code so to have the user choose from a date time picker calendar to display the dates and time in this format for the calendar:
1/20/2010 1:50:02AM
The format for the calendar is displaying: YYYY-MM-DD hh:mm:ss
------------------------------------------
//WhilePrintingRecords ;
Global DateVar Range DateRange ;
DateRange:= (if {?Date Range} = "Last 7 Days" then CurrentDate-7 to CurrentDate
else if {?Date Range} = "Last 30 Days" then CurrentDate-30 to CurrentDate
else if {?Date Range} = "Last 60 Days" then CurrentDate-60 to CurrentDate
else if {?Date Range} = "Last 90 Days" then CurrentDate-90 to CurrentDate
else if {?Date Range} = "Last 120 Days" then CurrentDate-120 to CurrentDate
else if {?Date Range} = "Last Year (ie 365 Days)" then CurrentDate-365 to CurrentDate
else CurrentDate-365 to CurrentDate);
Minimum(DateRange) & " to " & Maximum(DateRange)
Thanks.
How can i modify this code so to have the user choose from a date time picker calendar to display the dates and time in this format for the calendar:
1/20/2010 1:50:02AM
The format for the calendar is displaying: YYYY-MM-DD hh:mm:ss
------------------------------------------
//WhilePrintingRecords ;
Global DateVar Range DateRange ;
DateRange:= (if {?Date Range} = "Last 7 Days" then CurrentDate-7 to CurrentDate
else if {?Date Range} = "Last 30 Days" then CurrentDate-30 to CurrentDate
else if {?Date Range} = "Last 60 Days" then CurrentDate-60 to CurrentDate
else if {?Date Range} = "Last 90 Days" then CurrentDate-90 to CurrentDate
else if {?Date Range} = "Last 120 Days" then CurrentDate-120 to CurrentDate
else if {?Date Range} = "Last Year (ie 365 Days)" then CurrentDate-365 to CurrentDate
else CurrentDate-365 to CurrentDate);
Minimum(DateRange) & " to " & Maximum(DateRange)
Thanks.