• 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: Number of days since 1/1/0001
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Number of days since 1/1/0001


  • Subject: Re: Number of days since 1/1/0001
  • From: Matthew Smith <email@hidden>
  • Date: Sat, 24 Nov 2001 10:48:35 +1100

on 24/11/01 09:54, ehsan saffari at email@hidden wrote:

> Given any date, I need to figure out the number of days that have passed
> since January 1, 0001, (730811 days for 23/11/2001)
>
> This should be easy with a simple date subtraction but AS simply refuses
> to accept a date with a year less than 1000.
>
> set {dd, mm, yyyy} to {1,1,1}
> set temp to date ("" & dd & "/" & mm & "/" & yyyy)
> --> date "Monday, January 01, 2001 00:00:00" ^!*%^@
>
> any ideas?

It seems you can't enter a date directly with a year below 1000. It assumes
you want it to be 2000 + the value. You can use another date and subtract
the known days difference to get the value.

Set theDate to date "23/11/2001" - 730811 * days

It seems strange to want to go back that far anyway. The calculations would
be incorrect. We have changed the calendar system several times between 1
january 0001 and now.
--
Matthew Smith


  • Follow-Ups:
    • Re: Number of days since 1/1/0001
      • From: Jason Bourque <email@hidden>
References: 
 >Number of days since 1/1/0001 (From: ehsan saffari <email@hidden>)

  • Prev by Date: Number of days since 1/1/0001
  • Next by Date: Re: Number of days since 1/1/0001
  • Previous by thread: Number of days since 1/1/0001
  • Next by thread: Re: Number of days since 1/1/0001
  • Index(es):
    • Date
    • Thread