Re: How short can I make it
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