Jump to content
  • 0

Date Of Birth Field


seancsn

Question

6 answers to this question

Recommended Posts

  • 1

To have a field default to today's date, I add JavaScript code to the footer element of the data page. (make sure when you are adding code to the footer element that you add it in the source and not the text editor.)

<script>
/* Today's Date */

Today = new Date();

var dtTodayDate;

if ( Today.getMonth() == 0 )  {
dtTodayDate =( '' + (Today.getMonth())+1 + "/" + Today.getDate() + "/" + Today.getFullYear() );
} else if ( Today.getMonth() == 1 )  {
dtTodayDate =( '' + "2/" + Today.getDate() + "/" + Today.getFullYear() );
} else {
dtTodayDate =( '' + (Today.getMonth()+1) + "/" + Today.getDate() + "/" + Today.getFullYear() );
}


document.getElementById("InsertRecordDate").value=dtTodayDate;
</script>

Link to comment
Share on other sites

  • 0

Hi @seancsn,

You can use a calculated field/value to get the specific part of the date. 

You can use this formula:

CONVERT(DATETIME, GetUTCDate(), 101)

For further information, you can check these documentations:

https://howto.caspio.com/function-reference/

https://howto.caspio.com/datapages/datapage-components/calculated-values/

https://howto.caspio.com/datapages/reports/advanced-reporting/calculations-in-forms-and-reports/

I hope this helps :) 

~WatashiwaJin~

Link to comment
Share on other sites

  • 0
On 12/24/2015 at 3:18 PM, Aurora said:

Hello seancsn.

 

 

You could receive the following external parameters  [@cbTimestamp*] in the Date Field. 

 

Aurora

Hi Aurora,

Excuse my novice status, would you please advise the steps of entering the mentioned parameter [@cbTimestamp*] into my table to fetch the today's date 

Regards,

Link to comment
Share on other sites

  • 0
On 11/25/2019 at 6:54 AM, Mostafa said:

Hi Aurora,

Excuse my novice status, would you please advise the steps of entering the mentioned parameter [@cbTimestamp*] into my table to fetch the today's date 

Regards,

  1. Select the field in the datapage and go to the Advanced tab
  2. Under "External Associations and Defaults" section, enable the On load option and select "External Parameters" from the dropdown.
  3. Remove what is in the parameter text field and paste the today date parameter [@cbTimestamp*]
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
Answer this question...

×   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...
×
×
  • Create New...