Calendar Box QuestionWhen using the calendar box to allow users to select a single date, is there a way to set the time to 12:00:00AM of the date selected? I ask because with the code I'm using below, each time I select a given date (e.g., August 1, 2022) I get a slightly different value depending on the time of day when the code was run.
Ultimately, I'm using the calendar box to select a given date and to then select rows in a data table where sdate == Date and which is derived from a formula (Date MDY( :Month, :Day, :Year ).
nw = New Window( "Instrument Linearity Test Date",
<<MODAL></MODAL>
Advanced Statistical ModelingData Blending and CleanupMass CustomizationWindowsRe: Calendar Box QuestionDang, I got a hat trick of outstanding suggestions from some heavy hitters. Thanks fellas for weighing in on this and offering some helpful and informative suggestions.
Re: Calendar Box QuestionHere's a way to take the time off of the date:
nw = New Window( "Instrument Linearity Test Date",
<<MODAL></MODAL>
Re: Calendar Box QuestionYou can just subtract off the seconds since midnight.
sdate = Today();
Show( Format( sdate, "m/d/y h:m" ) );
sdate -= Modulo( sdate, In Days( 1 ) );
Show( Format( sdate, "m/d/y h:m" ) );
Re: Calendar Box QuestionTake a look at Select Date Range with Calendar Boxes . See if the "roundMidnight" function and the OnClose for the modal dialog will do what you need.
@danschikore