Time - Displaying and Setting Seconds

Tinderbox Icon

Do Date attributes have seconds?

All Date (i.e. Date/Time) attributes inherently include a time down to seconds level, even if it isn't always displayed. However, confusion arises as Key Attributes, i.e. as shown in the top of a note's Text window, can't 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".


Possible relevant notes (via "Similar Notes" feature):

Up: Import/Export/Formatting
Previous: Text line endings  Next: UTF-8 Export 

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

Quicklinks: Attributes | Action Codes | Export Codes | Designators | Date Formats | aTbRef Site Map

[Last updated: 16 May 2012, using v5.11.1]


Search:

Google search aTbRef for:  


Creative Commons Licence

aTbRef by Mark Anderson is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

[See aTbRef CC licence Attribution & Waiver info]

Made with Tinderbox