Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Determine time interval for deletion
#6
Macro Macro267
Code:
Copy      Help
out

str fileData=
;2016-05-02 13:40:21 "one"
;2016-10-02 13:40:21 "two"
;2016-08-02 13:40:21 "three"
;2016-10-12 13:40:21 "four"

DateTime d.FromComputerTime
d.AddParts(-30)
str sDate=d.ToStrFormat("{yyyy-MM-dd} {HH:mm:ss}")

str newData s
foreach s fileData
,if(strcmp(s sDate)<0) continue
,newData.addline(s)

out newData


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)