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></MODAL>
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></MODAL>
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.
Your input field is a text box, so you need to convert the date from a numeric number of seconds, to a string using a format() function
CurrTime = format(As Date(Today()),"m/d/y h:m:s",6) ;
New Window( "BATCH_CREATE_TIME",
<<MODAL></MODAL>