Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Timestamp ConversionNew to Visual Studio Code? Get it now.
Timestamp Conversion

Timestamp Conversion

su

|
1,754 installs
| (0) | Free
Convert Unix timestamps and date strings to human-readable dates
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Timestamp Conversion

Convert Unix timestamps and date strings to a human-readable local date.

Timestamp Conversion demo

Usage

  1. Select a timestamp or date string in a text editor.
  2. Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P).
  3. Run Timestamp Conversion: Convert Timestamp.

The converted value is appended to the selection instead of replacing it. The time is displayed in the local time zone. For example, in Asia/Shanghai:

1700000000->2023-11-15 06:13:20

Supported inputs

  • 10-digit integers are interpreted as Unix timestamps in seconds.
  • Other integer values are interpreted as Unix timestamps in milliseconds.
  • Date strings accepted by JavaScript's Date.parse are supported.
  • Negative timestamps and surrounding whitespace are supported.

When multiple selections are active, $i is replaced with the one-based selection number before conversion:

170000000$i
170000000$i

Invalid selections show an error message without preventing valid selections from being converted.

Development

npm install
npm run compile
npm run lint
npm test

Release notes

1.2.1

  • Improved the README demo and usage examples.

1.2.0

  • Fixed date-string conversion.
  • Added validation and error messages for invalid input.
  • Added support for negative timestamps and automated behavior tests.

1.1.0

Added the dateformat dependency.

1.0.0

Initial release of Timestamp Conversion.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft