- Introduction to WorkXpress
- Building Your Application
- Examples and Best Practices
- Technical Manual
The selected file /tmp/fileMHtH0v could not be uploaded, because the destination sites/default/files/css/css_a91cd284035e73ba34d112bfed2f5a16.css is not properly configured. The selected file /tmp/fileziOKYW could not be uploaded, because the destination sites/default/files/css/css_de1aa27776f1462d2b0d83a80ce4b92d.css is not properly configured.
The date and time Field stores a date and time. Internally, the stored value for all date/time Fields is a timestamp which equals the number of seconds elapsed from January 1, 1970 to the time specified. Outwardly, though, it appears as a calendar date and a time of the day.
Since a date and time Field is just a number, setting a default value requires that you supply the Expression Builder with an expression which will result in a number. Thus if setting a date and time Field to default to a value saved in another date or time Field, you must use the WX Stored Value Output format, which will evaluate to a number.
Although a date and time Field is stored internally as a number, when interacting with the Field on a page, you must input a day and a time.
Setting the date is done by clicking on the date part of the Field and clicking on a day from the calendar flyout which will appear.
Setting the hour and minute are done by typing a number into the hour and minute Field Parts. There is no validation on these parts, though only two characters are allowed in each Field Part. Entering non-real times is allowed, though, and is handled by WorkXpress by adjusting the time by however many hours or minutes exceed 24 or 60, respectively. For example, if 12/31/1985 25:00 AM is entered and saved into a Date and Time field, WorkXpress would adjust the value to 01/01/1986 1:00 AM. Selecting AM or PM is done by using the AM/PM drop-down.
When setting the Date & Time field through actions, two different input formats may be used. As with other field types, the stored value from another Date & Time field may be used to save into a Date & Time field. Since the stored value for these fields is a timestamp, any timestamp value may also be used to save into a Date & Time field (may be calculated from an expression or extracted from a Date or Time field).
In addition to this, the text output of the Date & Time field (e.g. 04/23/1985 6:08 AM) may also be used to save into the Date & Time field. Because of this, you may also construct such a text string and use it to save into the Date & Time field. For instance, if I wanted to extract the date from a Date field and the Time from a Time field, combine them, and save the result in a Date & Time field, I could use the Displayed Value output for the Date field and the Displayed Value output for the Time field, and save it into a Date & Time field.
Ex. Suppose you have a Date field called Event Date and two time fields called Start Time and End Time on an item called Event and you needed to save two date & time fields called Start Date and Time and End Date and Time. To do this, set up actions to set the expression ${Event - Event Date} ${Event - Start Time} into the Start Date and Time field and the expression ${Event - Event Date} ${Event - End Time} into the End Date and Time field.
The date and time Field has four interface parts but only one storage part.
The address field has 25 different output formats. The following are examples of output when 09/09/2009 9:09 PM is stored in the date and time Field:
The Date and Time field can be filtered with any of the six standard time-type filters.