Page 1 of 1

Compare creation dates of two files

Posted: Wed Oct 20, 2021 5:25 pm
by RunDontStop
I have two files in a flow. Switch can determine the creation dates for both files.

I want to know if the creation dates are more than 30 days apart.

Is there a way to do this?

Re: Compare creation dates of two files

Posted: Thu Oct 21, 2021 7:49 am
by jan_suhr
A new version of the App Date Calculator will give you the Unix timestamp and from that value you can use Switch Calculations to compare two .

The version 6 of Date Calculator will be published on the Enfocus App Store in the coming days.

https://www.enfocus.com/en/appstore/pro ... calculator

Re: Compare creation dates of two files

Posted: Thu Oct 21, 2021 3:58 pm
by jan_suhr
Version 6 is now published with the new option that you can use to solve your problem.

Re: Compare creation dates of two files

Posted: Fri Oct 22, 2021 1:51 am
by RunDontStop
Thank you Jan this is a great help.

Re: Compare creation dates of two files

Posted: Fri Dec 03, 2021 11:42 am
by ToAnt
Can the app also compare 2 dates? Ex. If date1 X days earlier then date2 , go to ...

Thx
Tom

Re: Compare creation dates of two files

Posted: Fri Dec 03, 2021 12:07 pm
by jan_suhr
ToAnt wrote: Fri Dec 03, 2021 11:42 am Can the app also compare 2 dates? Ex. If date1 X days earlier then date2 , go to ...

Thx
Tom
No such function but you can do it in Switch in the "Include these jobs" on the outgoing connection from folders.
From the App you will get the TimeStamp as a Private data, this is a numerical value and can easily be compared with another TimeStamp value.

Re: Compare creation dates of two files

Posted: Wed Nov 23, 2022 5:54 pm
by rgpepper
I need to compare these two (dates). I need to compare in the format of; checking if one is equal to or less than the other (and neither is today or have any relationship to today) - basically, is this file "overdue":

Is this date the same or *older*
[Metadata.Text:Dataset="pdf",Model="XML",Path="//text[starts-with(.,'Sent: ')]",Search="((\d{1})|(\d{2}))\/((\d{1})|(\d{2}))\/(\d{4})"]

Than this date:
[Metadata.Text:Dataset="XML",Model="XML",Path="/Log/SQLStatementValue/Row/Column[7]"]

I'm getting them formatted mm/dd/yyyy. I just can't "see' how to compare them to determine routing between 2 possible paths.