Select Page

I use a simple set of scripts that allow me to enter dates in a range of formats. Day.Month.Year, Month/Day/Year, Year-Month-Day with a range of separators. This is done using the standard script below and changing the <key> and Date/Time format String.

:*:<key>::
FormatTime, timeString,,<timeFormat> Send %timeString% Return

For example I have the following setup;

key FormatString Output
ddd yyyy.mm.dd 2016.09.17
sdd dddd mm Monday 19
ldd dddd, dd mmmm yyyy Friday, 17 September 2016
sdmy dd/mm/yyyy 19/09/2016
ddmy dd-mm-yyyy 19-09-2016

and so on.

To make it easier to select any date in any of the formats I use I added this little script.

#+d::
:*:cdd::
  Gui, Add, MonthCal, vDate
  Gui, Add, DropDownList, vFormatString, yyyy.MM.dd||yyyy.MMM.dd|dddd dd MMM yyyy|dddd dd|yyyy/MM/dd|yyyy/MMM/dd|dd/MM/yyyy|dd/MMM/yyyy|yyyy-MM-dd|yyyy-MMM-dd|dd-MM-yyyy|dd-MMM-YYYY
  Gui, Add, Button,Default Section gDateTime_OK,&OK
  Gui, Add, Button,ys gDateTime_Cancel,&Cancel
  Gui, Show
  Return

DateTime_OK:
  Gui,Submit
  FormatTime, timeString, %Date%, %FormatString%
  Send %timeString%
  Gui, Destroy
  Return

DateTime_Cancel:
  Gui, Destroy
  Return

datedialogSelecting Win + Alt + d or typing cdd pops up a small calendar dialog  and allows you to select a date and a format from the drop-down list, it’s then added where the cursor is.

 

Save

Save

Save

Save

%d bloggers like this: