Modern DateTime Concepts
Greetings,
I ran across the following post, while trying to understand how to set DateTime values: https://my.skybow.com/hc/en-us/community/posts/360007691699-Formatting-time-chooser.
This doesn't seem to work in the modern environment. The original concept behind that thread is interesting, if it is still possible.
But, without getting too fancy, I am attempting to:
Set a DateTime (StartTime), to Today's Date & 6:30AM.
It might be as simple as something along the lines of:
=[[StartTime]].format('MM-dd-yyyy h:mm')
=[StartTime]].value('new Date() 6:30')
But I figured it might actually take a bit of JavaScript (moment).
Any help on this?
Thanks!
-
Dear Kilgore ServiceAccount,
to set the today's date at a specific time into a DateTime field, you could use the following Function Expression e.g. in the Initial Value Configuration:
var today = new Date();
return new Date(today.getFullYear(),today.getMonth(),today.getDate(),6,30);This is plain JavaScript as documented here: https://www.w3schools.com/js/js_dates.asp
Kind regards
Matthias
0
Please sign in to leave a comment.
Comments
1 comment