• 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: How short can I make it
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How short can I make it


  • Subject: Re: How short can I make it
  • From: David Ferrington <email@hidden>
  • Date: Thu, 13 Oct 2011 17:48:45 +0100

how long does each id have to last for and can they be reused, say every year? If yes, drop the year part, if you don't care about it being readable, how about seconds since the Epoch (1970-01-01 00:00:00 UTC)?
That’s just 9 digits, before doing anything with it.
Then convert it into hex ?

Who knows what Columbus would have discovered if America hadn't got in the
way.
-Stanislaw J. Lec, poet and aphorist (1909-1966)

On 13 Oct 2011, at 17:35, Paul Abney wrote:

> I need to create a unique identifier, but the script will not know what has been used before. So the best idea I have so far is to use date and time to create a number. For this application down to seconds would be fine. So I would have yymmddhhmmss example 111015182245. However I would rather not have a 12 digit number if at all possible. So I then thought that for any of the above sequence that has less that 26 possibilities I could use alpha characters with a=1 b=2 and so forth. Assuming starting from 2011 and not going beyond 26 years My number above would now be aj15r2245. This brings us down to 9 characters, but can I go shorter? I am sure there is a way, and probably very simple but it escapes me, so I thought I would has the smartest group I know.
> Thanks for any suggestions.
> Paul

 _______________________________________________
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: How short can I make it
      • From: "Mark J. Reed" <email@hidden>
References: 
 >How short can I make it (From: Paul Abney <email@hidden>)

  • Prev by Date: How short can I make it
  • Next by Date: Re: How short can I make it
  • Previous by thread: How short can I make it
  • Next by thread: Re: How short can I make it
  • Index(es):
    • Date
    • Thread