Compare creation dates of two files

Post Reply
RunDontStop
Member
Posts: 51
Joined: Mon Apr 05, 2021 8:03 pm

Compare creation dates of two files

Post 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?
jan_suhr
Advanced member
Posts: 586
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: Compare creation dates of two files

Post 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
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
jan_suhr
Advanced member
Posts: 586
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: Compare creation dates of two files

Post by jan_suhr »

Version 6 is now published with the new option that you can use to solve your problem.
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
RunDontStop
Member
Posts: 51
Joined: Mon Apr 05, 2021 8:03 pm

Re: Compare creation dates of two files

Post by RunDontStop »

Thank you Jan this is a great help.
ToAnt
Newbie
Posts: 1
Joined: Tue Jul 06, 2021 10:54 am

Re: Compare creation dates of two files

Post by ToAnt »

Can the app also compare 2 dates? Ex. If date1 X days earlier then date2 , go to ...

Thx
Tom
jan_suhr
Advanced member
Posts: 586
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: Compare creation dates of two files

Post 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.
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
rgpepper
Member
Posts: 80
Joined: Wed Oct 14, 2015 2:09 am

Re: Compare creation dates of two files

Post 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.
Post Reply