Re: Newbie Date questions
Re: Newbie Date questions
- Subject: Re: Newbie Date questions
- From: "Mark J. Reed" <email@hidden>
- Date: Mon, 1 Mar 2010 19:17:43 -0500
What is the type of this modification date? If it's an AppleScript
date, then you can't treat it as a string. And if you coerce it into
a string, what you get is dependent on your locale settings. But you
could turn it into a string containing just the date any number of
ways. Here's one:
set applescript's text item delimiters to "T"
text item 1 of ((current date) as «class isot» as string)
filling in whatever your modification date is in place of (current date).
If you want a date object but don't care about the time, you can just
set the time component to a default value, e.g.
tell modDate to set {its hours, its minutes, its seconds} to {0, 0, 0}
On Mon, Mar 1, 2010 at 1:17 PM, ba95 <email@hidden> wrote:
> Hello scripters !
>
> I would like to know:
>
> 1- what would be the simplest way to reduce a modification date to "day/month/year" (skipping the time).
>
> friday november 25 10:12:56 -> friday november 25
>
> First solution:
>
> word 1 of modification date + word 2 of modification date + word 3 of modification date
>
> Second solution: TID
>
> Third solution ?...
>
> Best solution ?...
>
> 2- How can I force the finder to update items modification dates ? They are most of the time out of date.
> Issue with backup scripts.
>
> Thanks a lot for your help.
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
>
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden