Tinderbox v10 Icon

Time - Displaying and Setting Seconds

In v5+ Tinderbox date/times effectively have, but do not use, a seconds elements:

The rest of the article refers to Tinderbox before version 5


Do Date attributes have seconds?

All Date (i.e. Date/Time) attributes inherently include a time down to seconds level, even if it is not always displayed. However, confusion arises as the Displayed Attributes table cannot be made to display the seconds for a Date attribute; instead they always show the OS short date with hours and minutes only. In addition, some process default to using seconds of '00' whilst others use the seconds as at time of execution. Or, edit $DisplayedAttributesDateFormat to use a custom format.

Which operators do not use seconds in comparisons?

When comparing dates or doing date arithmetic, be aware of the seconds unless using days() or minutes() which compare in whole days or whole minutes respectively. Also a positive or negative equals query (== or !=) will ignore time completely and match on whole days, like the days() operator.

Can I display a Date attribute in Displayed Attributes and see its seconds?

No. At least, no without altering your OS settings: see below.

Which date designators use the second of execution?

The designators yesterday, today, now, and tomorrow, plus any dates based on modifications of those designators will set the seconds as measured at time of setting the attribute.

Once a date/time has a non-00 seconds time, any modification to the value will preserve the seconds unless the modification expressly sets the seconds.

What time is set if a date is typed into a Displayed Attribute box?

Unlike the above, the hh:mm are taken from current time but the seconds are set at 00.

Can I type in a date and set seconds?

Yes, you will need to set your OS Time 'short' setting to show hh:mm:ss; otherwise, when you provide a seconds the data is ignored at seconds are set at 00. "20 January 2010", at 17:45 local time will set "20/01/2010 17:45:00." For the same time "20 January 2010 17:45:25" will set "20/01/2010 17:45:25".


See also—notes linking to here: