I hope someone can help me. I am a newbie to Applescript and am trying to translate some Excel VBA macros.
I have hit a problem in creating a date object from a string variable, which I build at run time.
set theDate to date theStringWithAppropriateDateFormat
works if I type it into Script Editor, but as soon as I enclose it in a tell block, I get an error and theDate is null.
i.e.
set theDate to date ("1" & "/" & "6" & "/" & "2009") (*the appropriate format for my regional settings *)
set aDateObject to date theDate
gives me "Cant get date (date "Monday, 1 June 2009 00:00:00")."
Any ideas - this is driving me mad
Thanks,
Tim
I have hit a problem in creating a date object from a string variable, which I build at run time.
set theDate to date theStringWithAppropriateDateFormat
works if I type it into Script Editor, but as soon as I enclose it in a tell block, I get an error and theDate is null.
i.e.
set theDate to date ("1" & "/" & "6" & "/" & "2009") (*the appropriate format for my regional settings *)
set aDateObject to date theDate
gives me "Cant get date (date "Monday, 1 June 2009 00:00:00")."
Any ideas - this is driving me mad
Thanks,
Tim