nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Huagen peng <huagen.p...@gmail.com>
Subject Re: Date operations
Date Tue, 31 May 2016 23:12:02 GMT
Thanks, Pierre.  Your answer is most helpful.

Huagen

> 在 2016年5月31日,下午4:26,Pierre Villard <pierre.villard.fr@gmail.com>
写道:
> 
> Hi Huagen,
> 
> Let's say the date you want to check is in attribute myDate, then I'd try something like
that :
> 
> ${myDate:toDate("yyyy/MM/dd HH:mm:ss"):toNumber():lt(${now():toNumber():minus(86400000))}
> 
> To be changed with the correct format.
> 
> Hope this helps.
> 
> 
> 2016-05-31 22:09 GMT+02:00 Huagen peng <huagen.peng@gmail.com <mailto:huagen.peng@gmail.com>>:
> Hi,
> 
> Besides toDate(), now(), and format(), are there any other date operations/manipulations?
 I want to check if a string representing a datetime is 24 hours before now and also need
to advance the datetime, e.g., by an hour.  Is ExecuteScript my only option?
> 
> Thanks,
> 
> Huagen
> 


Mime
View raw message