Fields – Date Time

A datetime field is used to specify an individual date, time, or combined date and time on which an event has or will occur. When the Time or Date & Time display is being used, the value displayed will be in your local time-zone, and when saved will be stored in the database in UTC time. When the Date display is being used, no time-zone conversion is done.

Date Example:

Date user control
A screenshot of the datetime field in trellispark, showing the blue label and the date only option for the field.

Time Example:

Time user control
A screenshot of the datetime field in trellispark, showing the blue label over the time only option for the field.

Date & Time Example:

Combined Date and Time user control
A screenshot of the datetime field in trellispark, showing the blue label over the date and time option for this field.

Below is the field definition used to create a date, which is the same for each of the three display options:

A screenshot of the field creation process for a datetime field in trellispark.

DateTime requires an XML Element Name to be stored in the database. The Show Elements field will determine whether this field will display as a date, time, or date and time. A Tool Tip can be made available and an Empty Message can be specified. It can be a required field if necessary, or potentially used as a Lookup Field.

The Auto Postback field allows you to specify if the page should refresh when this field is updated.

The Custom Data Format allows you to specify the format for how the data will be displayed to the user if you don’t like the default. This is also useful to skip some input steps that are not needed such as the seconds portion on the time.

A default value can also be specified by picking a Default Value Type. Below are the available types and options you’re given per selection.

  • Current DateTime
    • This option will set the default value to the date time that the instance the field is on is created. Two additional fields will also be available to further customize the default value, Default Value Addition and Default Value Addition Specification. These two fields work together and are optional.
      • Default Value Addition can be used to specify a number to manipulate the default value in conjunction with Default Value Addition Specification. For example if you want the default value to be 5 days after the record was created then you’d set Default Value Addition to 5 and Default Value Addition Specification to Day(s). This field supports negative values and if you don’t want any addition then set the value to 0.
      • Default Value Addition Specification is used to specify how the Default Value Addition field will be applied. This field is only used when Default Value Addition is not 0.
  • Specific DateTime
    • This option will display a Default Value field where you can specify the exact date time that will be used.
  • Target Result
    • This option will display a Target Information field where you can specify a target and the result it returns will be the default value
  • No Default Value
    • This option will not apply a default value to this field.

IMPORTANT NOTE: When specifying a default value only the type specified in Show Elements will be used. For example, if Show Elements equals Time, only the time portion of my default value will be used.

Updated on March 18, 2024

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support

Leave a Comment