Hello,
Pls. let me know the JS or FormCalc script code snippet for getting the current local time in HH:MM:SS format, or if not possible, then the current local time zone as codes, example, EST
Thank you
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
Try using;
util.printd("HH:MM:SS Z", new Date(), true)
Or to just get the time zone code;
util.printd("HH:MM:SS Z", new Date(), true).substring(9)
If you want a more verbose version you can use;
new Date().toLocaleFormat("%Z")
Regards
Views
Replies
Total Likes
Any help pls.?
Thank you
Views
Replies
Total Likes
In the custom Object library there is a field called "Current Date". In the Object tab of that field you can set the runtime property to be the current time and it should display the current time and time zone. For example I created a new form, selected that field, changed it to a runtime property and when I open the PDF it says "1:38:10 PM CST". Is that what you are wanting?
Thank you.
Actually, for some other reason I need to get local time zone, pls. let me know the JS code for to get local time zone
Regards
Views
Replies
Total Likes
Are you saying that you want the time displayed as your local time or as the user that is completing it? The example I gave has my time zone which is Central Standard Time or CST. Did you want to convert the time to Eastern time or leave it as the time zone the user is in?
Sorry for confusion, let me make it simple.
1) I placed a free text feld, say its name is my_text_zone on my_form
2) Then I gonna put JS in INITIALIZATION event of my_text_zone, which determined the local time zone,as below
Example, now I'm in EST, hence I will see EST when i open the form, same for you but it's as CST
In short, I want to populate/display the user local time zone on the field / form
Thank you
Views
Replies
Total Likes
Hi,
Try using;
util.printd("HH:MM:SS Z", new Date(), true)
Or to just get the time zone code;
util.printd("HH:MM:SS Z", new Date(), true).substring(9)
If you want a more verbose version you can use;
new Date().toLocaleFormat("%Z")
Regards
Views
Replies
Total Likes
Perfect, Thank you
Views
Replies
Total Likes
Hello,
We are a multi national private company, located in Washington DC, we are looking for a expert LC developer with excellent JS expertise, its 3 months project, pls. reply ASAP if you are available, interviews will be immediate (no remote work pls.)
Thank you
Views
Replies
Total Likes
Views
Likes
Replies