How to insert date, time or custom timestamp in Notepad++


One might want to insert the current time or timestamp in Notepad++ as it can be useful in situations like,

  • Adding Time-stamp in log files: If you are working with log files, it can be useful to insert timestamps to indicate when events occurred. This can help with troubleshooting and tracking down issues.
  • Tracking code changes: If you are working with code, it can be useful to insert timestamps to track changes say a git commit log. This can help you keep track of when you made changes and help with version control like git/svn/cvs.
  • Creating time-sensitive documents: If you are working on a document that has time-sensitive information, such as meeting notes or project plans, inserting timestamps can help ensure that everyone is working with the most up-to-date information.
  • Creating a timeline of events: If you are working on a project that has multiple milestones or stages, inserting timestamps can help you create a timeline that shows the progression of the project over time.
  • When Collaborating with others: If you are working on a document with multiple collaborators, inserting timestamps can help ensure that everyone is working on the latest version of the document.
  • Scheduling reminders/to-dos: If you use Notepad++ to create to-do lists or reminders, inserting timestamps can help you prioritize tasks based on when they need to be completed.

Steps: How to insert time/date in Notepad++ file

Insert Date time Notepad++
  1. Keep the cursor on the location where you want to insert the date and time.
  2. Now based on what you want date/time/timestamp, do the following,
    a) To insert Date (Short): Go to Menu: Edit -> Insert -> Date Time (short)
    b) To insert Date (Long): Go to Menu: Edit -> Insert -> Date Time (long)
    c) To insert Custom Date/time/timestamp: Go to Menu: Edit -> Insert -> Date Time (customized)
    
  3. Once you click on any of the options, the date/time will get inserted at the current position of the cursor.
Inserted date time timestamp in Notepad++ file

How to customize date/time in Notepad++

  1. Open Notepad++
  2. Go to Menu: Settings -> Preferences...
  3. Now move to Multi-Instance and date tab in the side-bar
  4. Set any custom date time format you want.

    Examples:
    Format -> Output Example
    yyyy -> 2023
    yyyy-MM-dd -> 2023-03-11
    dd/MM/yyyy -> 11/02/2023
    MM/dd/yyyy -> 02/11/2023
    HH:mm -> 12:44
    dd MM yyyy HH:mm:ss -> 12 01 2023 12:03:24
  5. You will see a preview at the bottom of the text box
  6. Click close once you are done.
Setting custom date time Notepad++

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org



















Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap