An extension for Visual Studio Code that provides a configurable command for inserting the current date and time
A plugin for Visual Studio Code that inserts the current date and/or time according to configured format. Available in VisualStudio Marketplace.
Notice Version 2.0 changed settings namespace from insertdatestring
to insertDateString
. Please update your userspace and workspace settings.
Open Command Palette by pressing F1
, type ext install
and then look for Insert Date String extension.
Following commands are available:
Insert DateTime
(⇧+⌘+I on OS X, Ctrl+Shift+I on Windows and Linux) - Inserts current date and/or time according to configured format (format
) at the cursor position.Insert Date
- Inserts current date according to configured format (formatDate
) at the cursor position.Insert Time
- Inserts current time according to configured format (formatTime
) at the cursor position.Insert Timestamp
- Inserts current timestamp in milliseconds at the cursor position.Insert Formatted DateTime
(⇧+⌘+⌥+I on OS X, Ctrl+Alt+Shift+I on Windows and Linux) - Prompt user for format and insert formatted date and/or time at the cursor position.Insert DateTime
output):Insert Date
output):Insert Time
output):// Date format to be used.
"insertDateString.format": "YYYY-MM-DD hh:mm:ss",
"insertDateString.formatDate": "YYYY-MM-DD",
"insertDateString.formatTime": "hh:mm:ss",
iso
(2013-07-16T20:13:31Z)YYYY-MM
(2013-07)YYYY-MM-DD
(2013-07-16)YYYY-MM-DDThh:mm:ssZZZ
(2013-07-16T20:13:31+01:00)Released under the MIT License.