getdate & filedate

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1417
Joined: Sun Nov 03, 2002 3:19 am

getdate & filedate

Post by Dorian (MJT support) » Thu Apr 07, 2005 6:49 pm

I was going to write a macro which uploads all files changed today via ftp. Here's my dilemna.

With getdate and filedate, one returns the date in the 20050407 format and the other in the 4/7/2005

So how can I easily and reliably compare these strings if they report differently?

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1417
Joined: Sun Nov 03, 2002 3:19 am

Post by Dorian (MJT support) » Thu Apr 07, 2005 7:33 pm

Ah ha. I answered my own question. This is what I came up with, and it seems to work nicely.

FileDate>c:\306.txt,filedate
day>dy
month>mn
year>yr
concat>%yr%,%mn%
concat>%yr%,%dy%
let>today=%yr%
messagemodal>%today% %crlf%%filedate%

if>todayfiledate,end
REMARK>upload routine
messagemodal>match!!

label>end

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Thu Apr 07, 2005 9:00 pm

No need for Concat:

Year>yy
Month>mm
Day>dd
Let>date=%yy%%mm%%dd%
MJT Net Support
[email protected]

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1417
Joined: Sun Nov 03, 2002 3:19 am

Post by Dorian (MJT support) » Thu Apr 07, 2005 9:29 pm

Ah, yes, many thanks. I realize now a lot of my macros have some rather messy concats in them. I'll do it your way from now on, as it makes far more sense.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts