Skip to main content

8.2.1 The date and time prompt

When Org mode prompts for a date/time, the default is shown in default date/time format, and the prompt therefore seems to ask for a specific format. But it in fact accepts date/time information in a variety of formats. Generally, the information should start at the beginning of the string. Org mode finds whatever information is in there and derives anything you have not specified from the default date and time. The default is usually the current date and time, but when modifying an existing timestamp, or when entering the second stamp of a range, it is taken from the stamp in the buffer. When filling in information, Org mode assumes that most of the time you want to enter a date in the future: if you omit the month/year and the given day/month is before today, it assumes that you mean a future date1. If the date has been automatically shifted into the future, the time prompt shows this with β€˜(=>F)’.

For example, let’s assume that today is June 13, 2006. Here is how various inputs are interpreted, the items filled in by Org mode are in bold.

β€˜3-2-5’⇒ 2003-02-05
β€˜2/5/3’⇒ 2003-02-05
β€˜14’⇒ 2006-06-14
β€˜12’⇒ 2006-07-12
β€˜2/5’⇒ 2007-02-05
β€˜Fri’⇒ nearest Friday (default date or later)
β€˜sep 15’⇒ 2006-09-15
β€˜feb 15’⇒ 2007-02-15
β€˜sep 12 9’⇒ 2009-09-12
β€˜12:45’⇒ 2006-06-13 12:45
β€˜22 sept 0:34’⇒ 2006-09-22 0:34
β€˜w4’⇒ ISO week for of the current year 2006
β€˜2012 w4 fri’⇒ Friday of ISO week 4 in 2012
β€˜2012-w04-5’⇒ Same as above

Furthermore you can specify a relative date by giving, as the first thing in the input: a plus/minus sign, a number and a letterβ€”β€˜d’, β€˜w’, β€˜m’ or β€˜y’—to indicate change in days, weeks, months, or years. With a single plus or minus, the date is always relative to today. With a double plus or minus, it is relative to the default date. If instead of a single letter, you use the abbreviation of day name, the date is the Nth such day, e.g.:

β€˜+0’⇒ today
β€˜.’⇒ today
β€˜+4d’⇒ four days from today
β€˜+4’⇒ same as +4d
β€˜+2w’⇒ two weeks from today
β€˜++5’⇒ five days from default date
β€˜+2tue’⇒ second Tuesday from now

The function understands English month and weekday abbreviations. If you want to use un-abbreviated names and/or other languages, configure the variables parse-time-months and parse-time-weekdays.

Not all dates can be represented in a given Emacs implementation. By default Org mode forces dates into the compatibility range 1970–2037 which works on all Emacs implementations. If you want to use dates outside of this range, read the docstring of the variable org-read-date-force-compatible-dates.

You can specify a time range by giving start and end times or by giving a start time and a duration (in HH:MM format). Use one or two dash(es) as the separator in the former case and use β€˜+’ as the separator in the latter case, e.g.:

β€˜11am-1:15pm’⇒ 11:00-13:15
β€˜11am--1:15pm’⇒ same as above
β€˜11am+2:15’⇒ same as above

Parallel to the minibuffer prompt, a calendar is popped up2. When you exit the date prompt, either by clicking on a date in the calendar, or by pressing RET, the date selected in the calendar is combined with the information entered at the prompt. You can control the calendar fully from the minibuffer:

RETChoose date at point in calendar.
mouse-1Select date by clicking on it.
S-RIGHTOne day forward.
S-LEFTOne day backward.
S-DOWNOne week forward.
S-UPOne week backward.
M-S-RIGHTOne month forward.
M-S-LEFTOne month backward.
>Scroll calendar forward by one month.
<Scroll calendar backward by one month.
M-vScroll calendar forward by 3 months.
C-vScroll calendar backward by 3 months.
C-.Select today’s date3

The actions of the date/time prompt may seem complex, but I assure you they will grow on you, and you will start getting annoyed by pretty much any other way of entering a date/time out there. To help you understand what is going on, the current interpretation of your input is displayed live in the minibuffer4.


  1. See the variable org-read-date-prefer-future. You may set that variable to the symbol time to even make a time before now shift the date to tomorrow.↩
  2. If you do not need/want the calendar, configure the variable org-popup-calendar-for-date-prompt.↩
  3. You can also use the calendar command . to jump to today’s date, but if you are inserting an hour specification for your timestamp, . will then insert a dot after the hour. By contrast, C-. will always jump to today’s date.↩
  4. If you find this distracting, turn off the display with org-read-date-display-live.↩