database30 Posted August 5, 2009 Report Share Posted August 5, 2009 Hi, I have a field named "todaysdate" and I am trying to add it into the timestamp script that I found on the message board. Here is the javascript: //(1) Declaration and initialization Stamp = new Date(); var v_TimeStamp; //(2) Construct the value of the v_TimeStamp variable in the format mm/dd/yyyy v_TimeStamp=('' + (Stamp.getMonth() + 1) +"/"+Stamp.getDate()+ "/"+Stamp.getFullYear()); //(3) Field name - Date is referred with a prefix - EditRecord document.forms[0].EditRecordDate.value=v_TimeStamp; If you could guide me in the right direction that would be greatly appreciated. Thank you, J Quote Link to comment Share on other sites More sharing options...
MeghaJ Posted August 6, 2009 Report Share Posted August 6, 2009 Hi, You forgot to change the field name to the one that you have in your table. Change this part of the code. document.forms[0].EditRecordDate.value=v_TimeStamp; to document.forms[0].EditRecordtodaysdate.value=v_TimeStamp; Also EditRecordFieldname is to access a field in a Search/Report DataPage. If you are trying to run this JavaScript for a webform then it would be InsertRecordFieldname. Thanks, Megha Quote Link to comment Share on other sites More sharing options...
JolliBeng Posted October 24, 2018 Report Share Posted October 24, 2018 Hello database30, You can now stamp the time on DataPages without having JavaScripts. You may visit this link. -JolliBeng Quote Link to comment Share on other sites More sharing options...
Aether Posted December 4, 2018 Report Share Posted December 4, 2018 Hello @database30, You can also use calculated field or calculated value in getting the current time using this formula: You can also check some function reference in time/date located under "Date and Time Functions": https://howto.caspio.com/function-reference/ I hope this helps ~WatashiwaJin~ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.