Hello
How to get CURRENT time and CURRENT date? I need this because, am creating a TEXT (multi line) field, when in user enters his/her COMMENTS/some notes/remarks, so i need to take care this COMMENTS by concatenating the TIME STAMP
For example, I opened my_form at 14:10, i got a tele call, its about 15 min., then i am back(now the time is 14:25) to my_form and entered some comments, so, i need to store these comments together with the TIME STAMP, meaning its 14:25 (not, 14:10)
Pls. let me kmow in Java Script
Thank you
Solved! Go to Solution.
Views
Replies
Total Likes
Here is one method.
Date
// form1.page1.subform1.date_::ready:layout - (FormCalc, client)
$.rawValue = Concat(Num2Date(Date(), "MM/DD/YYYY"))
Time
// form1.page1.subform1.time_::initialize - (JavaScript, client)
var date = new Date();
var hours = date.getHours();
if (hours > 12) {
this.rawValue = (hours - 12) + ":" + date.getMinutes() + " PM";
}
else {
this.rawValue = hours + ":" + date.getMinutes() + " AM";
}
Steve
Views
Replies
Total Likes
Here is one method.
Date
// form1.page1.subform1.date_::ready:layout - (FormCalc, client)
$.rawValue = Concat(Num2Date(Date(), "MM/DD/YYYY"))
Time
// form1.page1.subform1.time_::initialize - (JavaScript, client)
var date = new Date();
var hours = date.getHours();
if (hours > 12) {
this.rawValue = (hours - 12) + ":" + date.getMinutes() + " PM";
}
else {
this.rawValue = hours + ":" + date.getMinutes() + " AM";
}
Steve
Views
Replies
Total Likes