Convert date to seconds
Mike Bonner
bonnmike at gmail.com
Wed Jul 17 21:07:24 EDT 2013
Since its the number of seconds since.. I think 1970, there will always be
that many digits at least until the odometer rolls up to 9999999999 + 1.
Plenty of breathing space there.
On Wed, Jul 17, 2013 at 7:03 PM, Thomas McGrath III <mcgrath3 at mac.com>wrote:
> I am converting the short date (08/16/13) to seconds and I get 1376625600
>
> My question is "Is the converted seconds always that many digits when
> converted from that type of date?"
>
> The reason I ask is I am making filenames by merging a name like "Thomas"
> or "Tom" with the date converted to seconds as in "Thomas1376625600.txt" or
> "Tom1376625600.txt"
>
> I would like to script this conversion like:
>
> put char -10 to the number of chars of tFilename into tSeconds
> put char 1 to -10 of tFilename into tName
>
> --put "1376625600" into tSeconds
> convert tSeconds to short date
>
> and now tName should be either "Tom" or "Thomas" regardless of length and
> tSeconds will be "08/16/13" so I can use them in my app.
>
> This will not work if the converted seconds ever gets longer ( over the
> next twenty or thirty years or so).
>
> So, Does the converted seconds always stay at 10 digits in this scenario?
>
> Thanks
>
> Tom
>
> -- Tom McGrath III
> http://lazyriver.on-rev.com
> mcgrath3 at mac.com
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
More information about the use-livecode
mailing list