Hello everybody,
I have a nodered flow that allows me to grab files from an 'orders_json' folder, convert them to csv and drop them into an 'order_csv' folder.
For technical questions I cannot empty the files deposited progressively in my Json folder.
In my specific case, I would have to be able to parse only the files uploaded in the last 24 hours.
At the beginning of my flow with the node 'File Lister', I have the possibility of recovering the date of creation of the file.
The idea is to have this condition:
If the creation date of my file is between today's date (Ex: 11-05-23) and yesterday's date (Ex: 10-05-23) then I process my file. If not, I do not process my file.
I tried several ways, tests by creating a function or with a switch and an expression in JSONata. But I haven't found the solution yet.
I also watched some tutorials but they seem complex for a function that could be quite simple.
If any of you have a solution, I would greatly appreciate it.
Thank's a lot for your help
Alexandre