640 – Smart Dates

clip_image002

For all the time that computers have been used, date handling has been a problem. Bad dates cause problems from sorting lists to processing payments, yet many systems force the user to figure out what it expects by way of date entry – from web sites which force 2-digits (a la 01/01/22 vs 1/1/22) to non-localised apps which assume a date format without allowing it to be changed?

If you ever say a date out loud like “this report is due by eight-one”, meaning 8/1 or 1st August, then 91% of the world’s population will need to interpret that differently to how they represent dates, since most will expect the format to be day-month-year, or arguably most sensibly, year-month-day.

clip_image004

Try saving things like expense reports or invoices using the file name starting yy-mm-dd or even yyyy-mm-dd and they’ll be much easier to handle (aside from just sorting by created date, of course).

When a user enters a date into a Windows app, the vast majority will respect the format set by the operating system, known as the User Locale.

clip_image006That doesn’t help too much if the author of a spreadsheet – for example – is in one locale and clip_image008other users are elsewhere; if the default date format is numeric, then the field remains in the format of the author, and that may cause befuddlement.

Switching display format to Long Date – or even setting a shorter custom format – could avoid confusion. Under the covers, Excel still stores the date in a universal format, but people might interpret it incorrectly when display in a different format.

clip_image010Other tools can handle dates in surprisingly smart ways – even since its first version in 1997, Outlook lets you enter text into date windows like a Due Date for reminders or tasks – any time you are presented a date field that lets you type as well as select a date from a calendar picker, you can put stuff in like tomorrow, 2 weeks, next Friday, third Tuesday in October etc. There are shorter versions – 2w, 3m 10d – or you can string things together, like Monday before Christmas.

clip_image012Microsoft To Do has also has some date smarts; if you type in a new task to track, it can read dates and times out of your task description and automatically set due dates and Reminders.

clip_image014It has other kinds of parsing – in 3 days etc – though not quite as comprehensive as Outlook’s. There are also a load of special dates recognised (at least in the US).

So far, this functionality is available on Windows and iOS apps and for the most part it’s really neat. If it detects a date you don’t like – you’re suggesting something may happen, rather than it is happening on 1st May, for example – then just hit backspace to clear that association.

593 – It’s a Date

clip_image002Following last week’s missive on Notepad, including the obscure tip on how to create a log file, the topic of inserting and handling dates in other applications is worth a (re-)visit. Each individual app may choose to offer different methods and formats, but for common Office applications there are a handful of memorable tricks and shortcuts.

clip_image004In Word, there are plenty of ways to insert and manage dates – perhaps the most useful way to remind the reader when the document was last updated (manually showing when a document was last reviewed or published). On the Insert tab, you’ll find Date & Time on the right-hand side, letting you add appropriate info in the format of your choice. You can also tick a box to update the field automatically, though that simply means every time the document is opened, it will show today’s date… which feels a bit pointless.

clip_image006More useful could be to tell the reader when the document was created or last saved, by referencing the actual properties of the document clip_image008(though be careful; auto-save might mean someone opened an old document, realised it was irrelevant, but had inadvertently saved it back).

On the Insert tab / Quick Parts, look under Field, then pick the doc property and format you’d like to show.

It is worth pointing out that showing a date as 10/1/21 (or similar) is ambiguous given that a few hundred million people will expect it be month-day-year while many of the remaining 7 billion will assume the day comes first, with a couple of billion presuming the format should normally start with the year, such as yyyy-mm-dd (which is arguably the most sensible of all; and it sorts properly, too).

A more daily usable short format like dd-mmm-yy (ie 13-Aug-21) should perhaps be the norm, especially when the date is appearing as text in a document. Pressing SHIFT+ALT+D in Word will insert the current Date as a field (so you can edit the format to remove ambiguity) and SHIFT+ALT+T inserts the current time too. In PowerPoint, both of these combos bring up the “Date & Time” dialogue to add the chosen content and format as plain text.

clip_image010When formatting dates, incidentally, the convention is that two letters refer to the short number (eg dd = 13), whereas 3 d’s or m’s will use the short form of spelling the day or month, with 4 meaning the whole thing (ie Friday, August). Try formatting a cell in Excel as Custom, and you can preview what the format would be, by typing in a variety of letters.

While in Excel, it’s worth learning the short cut key to insert the date and time – CTRL+; and SHIFT+CTRL+; respectively (no doubt there’s a reason why Excel has a different shortcut to other Office apps – some legacy of Lotus 1-2-3 perhaps?).

OneNote fans will want to remember that SHIFT+ALT+D / T combo as it inserts the date/time into the notebook; really handy when taking notes of a phone call or similar. SHIFT+ALT+F puts both day and time, something that Word doesn’t offer. In both Desktop OneNote and users of the Windows Store version, it’s just plain text that gets added, so you’re on your own when it comes to formatting.

clip_image012

OneNote pages will typically have a date & time showing under their title – on the Desktop version, it’s possible to change that so as to mark a page as having been recently updated. No such luck on the lame duck Store version.

At least when stalwarts insist on writing – or worse, saying – a short-form date as something like “ten one”, there’s more than half of each month where one number in the date could only mean “day” – starting with the thirteenth (as in, 8/13 can never by the 8th of a month, but 8/12 could be a few days before Christmas to Europeans, or the date when tweedy Americans start looking for grouse in the Yorkshire moors and Scottish Highlands).

Tip o’ the Week 396 – Handling dates in Office apps

clip_image002There are many times when you may need to deal with dates in ordinary applications – and there are a few shortcuts that you can make it easier.

In Outlook, any time there’s a date field (like when you’re setting a reminder, or clip_image004entering the start date/time for an appointment) you can choose or enter a regular date, or put in an expression – like “2 days” or “next Tuesday” – and Outlook will figure out the offset from today, and will set the appropriate date.

In some date fields (like an appointment start time), if you say “4 days” then press enter or TAB, it will evaluate the new date; if you return and put “4 days” again, it may add those extra days to the last date. Try a few other things like “next Christmas”, “3rd Sunday in November”, “2mo” , “7d” or some special days – there are some surprising ones there, like “Lincoln’s birthday”, and other events with static dates … though nothing that might change the actual date from year to year (like Easter, or Thanksgiving).

clip_image006In Excel, press CTRL+; to insert the current date into any cell – add a SHIFT key to insert the time instead. Excel are many date-oriented functions, but you don’t always need to write functions – simple maths can work on date fields – calculating the number of days’ difference between two dates, for example, or adding a number of days to a start date.

clip_image008In the desktop OneNote app, if you want to edit the date and time at the top of a page, click on the field and you’ll see a clock or calendar icon appear next to it – click on that  is set to, click on that to change the value; handy if you’re updating some reference material and want to make it clear that it’s recent.

Another way might be to insert the current date or time into the text: to do so, press SHIFT-ALT-D, or SHIFT-ALT-T for the current time, or SHIFT-ALT-F for the current date and time. The last one is really handy if you’re taking notes about a phone call, and want to quickly note the time that your insurance company said that everything was all fine, or when you started the indefinite call to the airline. The same shortcuts apply to the desktop OneNote 2016 application and also the OneNote store app.

clip_image010Word also supports SHIFT-ALT-D and SHIFT-ALT-T like OneNote, though inserts a date or time field rather than a simple bit of text, and is slightly different to the Date & Time command on the Insert tab, which gives a bit more control over the formatting at the point of insertion, rather than requiring the user to insert the field then go back in to edit the format.

Since Outlook uses Word as its text editor behind the scenes, the same shortcut keys will also insert date fields into the text of an Outlook email.