This version is out of date, covering development from v7.0.0 to v7.5.6. It is maintained here only for inbound reference links from elsewhere. It is no longer actively updated.

Jump to the current version of aTbRef

Tinderbox 7 Icon

Time - Displaying and Setting Seconds

In v5+ Tinderbox date/times effectively have, but don't 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 Key Attributes, i.e. as shown in the top of a note's Text window, 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.

Which operators don't 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 Key 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 Key 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".



A Tinderbox Reference File : Formatting : Time - Displaying and Setting Seconds