Myriad Helpers & New Date from String

I’m trying to create a new date and then set a NSDatePicker to that date using Myriad Helpers with something like:

set newDate to "Saturday, January 25, 2014 at 3:30:00 PM"
datePicker's setDateAS_(newDate)

or

set newDate to "Saturday, January 25, 2014 at 3:30:00 PM"
datePicker's setDateAS_(date (newDate))

It seems I can’t figure out how to get this working. I tried messing around with NSDateFormatter, and dateFromString but no luck so far. A push in the right direction would be much appreciated. Thanks!

Got what I wanted working with:


set newDate to current date

tell newDate
set {its hours, its minutes, its seconds} to {15, 30, 00}
end tell

datePicker's setDateAS_(newDate)

It’s not a Myriad Helpers problem but a date problem – making a date from a string is problematic inside an ASObjC class. More details are here:

www.macosxautomation.com/applescript/apps/gotchas.html

I definitely didn’t think it was a Myriad Helpers issue. I figured the issue was with ASObjC, as the following works in a plain AppleScript application:

set aDate to "Saturday, January 25, 2014 at 03:30:00 PM"
set anotherDate to date aDate
anotherDate

Thanks for the more info link, Shane!