Skip navigation

JSI Tip 3480. Windows 2000 has hidden %date% and %time% environment variables?

If you open a CMD prompt and type set, the environment variables available in this session are displayed.

If you then type @echo %date%, you will receive the same output that a date /t would have produced.

If you then type @echo %time%, you will receive the same output that time would have produced.

If you use Control Panel / System / Advanced / Environment Variables, you won't find date.

If you navigate to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment or
HKEY_CURRENT_USERS\System\System\CurrentControlSet\Control\... the date environment variable is NOT defined.


Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish