Page 1 of 1

today's date as expression

Posted: 12 Dec 2018 04:25
by Rafi4
hi Martin and all
how can I get today's date or time as expression.

for example:
today is Dec 12

if date is Dec 12 write a file (true)
if date is not equal to Dec 12 notify on Statusbar (false)

give me script for time also(expression)

thanks from record4

Re: today's date as expression

Posted: 12 Dec 2018 17:45
by Desmanto
Use the dateformat.

Code: Select all

s = "{getDate(),dateformat,MMM dd}"
MMM is for the month, and dd is for the date. For the Date format pattern, look at Automagic documention : Date format pattern

Later use expressionto check it.

Code: Select all

s == "Dec 12"
True to write file, and false to notif on statbar.