• Login
Community
  • Login

Delete lines with date older that a week.

Scheduled Pinned Locked Moved General Discussion
3 Posts 2 Posters 768 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D
    Dennis Prather
    last edited by Jul 22, 2022, 1:22 PM

    I have a .csv file that has the following date field format 07/07/21.
    I need to delete all lines with dates older than a week.
    How can I accomplish that?

    A 1 Reply Last reply Jul 22, 2022, 1:57 PM Reply Quote 0
    • A
      Alan Kilborn @Dennis Prather
      last edited by Alan Kilborn Jul 22, 2022, 1:59 PM Jul 22, 2022, 1:57 PM

      @Dennis-Prather

      You’d have to write some code for that.
      The code could be via a scripting plugin inside Notepad++ (in which case this is an on-topic conversation for this forum) or a programming language external to Notepad++ (that would be an off-topic conversation best had on another site, if you need more help).

      If you want to do it with a scripting language plugin, and need help on that, you’d really need to say more about your data – like, does the date come at the start of every line of the file, or? You really should have a look at THIS.

      1 Reply Last reply Reply Quote 1
      • A Alan Kilborn referenced this topic on Jul 22, 2022, 5:19 PM
      • A
        Alan Kilborn
        last edited by Jul 22, 2022, 5:19 PM

        Discussion continued in a NEW thread.

        1 Reply Last reply Reply Quote 0
        2 out of 3
        • First post
          2/3
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors