Notepad Change to current system time

hi fnd,

how to change the yymmdd as per system in notepad.only 20190601 should replace by current system date as 20190703 in notepad.and also i want to change 20190701 should be changed to 20190801(nextmonth)

Thanks in advance!!script

DateTime.Today.ToString("yyyyMMdd") will give you “20190703”. So if your file text is stored in some string variable you can do something like myString = myString.Replace("20190601",DateTime.Today.ToString("yyyyMMdd"))

1 Like

hi Daniel,

the change is showing in my message box 20190601 is replaced by current yyyyMMdd…but it is not saving in my notepad…
and if you see in my notepad another thing 20190701 should change to 20190801(next month) in my notepad…how it can be done

Hi Daniel,

As per my notepad…
1)20190601 which is marked in red colour should be replace by next month…
2)20190701 should be replace by next month 20190801…
i dont want to hardcode it…
is any simple process is there

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.