Jump to content

Store only date, month and year instead of timestamp


Recommended Posts

Hi,

I need to store date when record was submitted. I know that I can stamp record, using a "time stamp" hidden field, but I need to store only date, month and year. I don't need time, because I'm not able to use this field in grouping data on Chart report.

Thanks for help!

Link to comment
Share on other sites

Hi Mylene,

Try using the following script:

<SCRIPT LANGUAGE="JavaScript">
 Stamp = new Date();
 var v_TimeStamp;
 v_TimeStamp=('' + (Stamp.getMonth() + 1) +"/"+Stamp.getDate()+ "/"+Stamp.getFullYear());

document.getElementById("InsertRecordDate_field").value=v_TimeStamp;
</SCRIPT>

Please add your field name instead of Date_field. 

Hope it helps.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...