• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Newbie Date questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Newbie Date questions
      • From: Michelle Steiner <email@hidden>
References: 
 >Newbie Date questions (From: ba95 <email@hidden>)

  • Prev by Date: Re: Strange message in console
  • Next by Date: Re: Newbie Date questions
  • Previous by thread: Re: Newbie Date questions
  • Next by thread: Re: Newbie Date questions
  • Index(es):
    • Date
    • Thread