I have a script that requires the user to input a batch creation time. It currently looks like this:
New Window( "BATCH_CREATE_TIME",
<<modal(),
Panel Box( "Enter BATCH_CREATE_TIME",
Lineup Box( N Col( 1 ) ),
number = Text Edit Box( "01/01/2021 09:00:00.000000" )
),
Panel Box( "Actions",
H List Box(
Button Box( "OK",
keep_going = 1;
BATCH_TIME = number << Get text;
),
Button Box( "Cancel", keep_going = 0 )
),
),
);
I want to update this so that it automatically puts the current time into the text box, so far I have this:
CurrTime = As Date(Today());
New Window( "BATCH_CREATE_TIME",
<<modal(),
Panel Box( "Enter BATCH_CREATE_TIME",
Lineup Box( N Col( 1 ) ),
number = Text Edit Box( CurrTime )
),
Panel Box( "Actions",
H List Box(
Button Box( "OK",
keep_going = 1;
BATCH_TIME = number << Get text;
),
Button Box( "Cancel", keep_going = 0 )
),
),
);
Now all I want to do is change the output to match the original format. I currently get the format "01Jan2021:09:00:00". Ideally, I'd like this to be "01/01/2021 09:00:00.000000" (the decimal seconds aren't vital).
Any ways that I can change the format of the As Date function?
Thanks all.