DateFieldSettings: Difference between revisions

From SMTX Wiki
Jump to navigation Jump to search
Created page with "To set a default date in a form, select a date field and in the default settings field add one of the following: T+0 - if the default date is the current date T+25 - if the..."
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
T+0  - if the default date is the current date
T+0  - if the default date is the current date
T+25 - if the default date should be 25 days from current date
T+25 - if the default date should be 25 days from current date
NOTE: do NOT turn on 'contains calculations' for the default value !


To set a fixed date, for example : 31/12/999, enter it as :<br>
To set a fixed date, for example : 31/12/999, enter it as :<br>

Latest revision as of 14:32, 22 February 2021

To set a default date in a form, select a date field and in the default settings field add one of the following:

T+0 - if the default date is the current date T+25 - if the default date should be 25 days from current date

NOTE: do NOT turn on 'contains calculations' for the default value !

To set a fixed date, for example : 31/12/999, enter it as :
yyyymmdd
Example:
99991231


To use a date in a section; create a text field or read-only field where the default input is the Date field. This will display the date in yyyymmdd format.

--new--
You have 1 date-time field, called 'startdate'.
ALso, a second date-time field, called 'enddate'.
You want to prefill the field 'enddate' with the date of the startdate-field, but the hour needs to be fixed on 17:00.
Set this as a default value in the field 'enddate', with calculations checked:
format('{0:yyyyMMdd170000}',TODATE('#REPLACE-FORMFIELD-testdatetime||startdate||#'))