Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: JulianDate

  1. #1

    Default JulianDate

    If I have a date - 20121001 -

    I now count 60 days and to compare this with a different date - how do I
    do this best?

    Dirk Büchel

  2. #2

    Default Re: JulianDate

    Dirk,

    Just calculate the Julian Date for 20121001 and then the Julian Date for the
    current date. If it is >= 60 then "do whatever you have to do".

    For example:

    Julian Date for January 01, 2013 = 2456294

    Julian Date for January 14, 2013 = 2456307

    2456307 - 2456294 = 13 (days)

    Friedrich

  3. #3

    Default Re: JulianDate

    Friedrich,

    is there a JulianDate-Function Clarion?

    I have looked for it many times, but never found it.

    In an old dBase-book I have such a JD-function in source..... but can't find
    that book neither!

    tia
    Wolfgang

  4. #4

    Default Re: JulianDate

    Wolfgang,

    > is there a JulianDate-Function Clarion?
    >
    > I have looked for it many times, but never found it.
    >
    > In an old dBase-book I have such a JD-function in source..... but can't
    > find
    > that book neither!

    No, there isn't a built-in Julian Date function available in Clarion. The
    Clarion Standard Date is only the number of days that have elapsed since
    December 28, 1800. The Julian Date is calculated from the year 4713 BC and
    increments every day since then.

    Friedrich

  5. #5

    Default Re: JulianDate

    Hi Dirk,

    FirstDate long
    Comparedate long
    code
    FirstDate = date( 10, 1, 2012 ) ! Guessing date is in yyyymmdd format
    CompareDate = firstDate + 60
    if DifferentDate > CompareDate
    do StuffIfDateIsLaterThan60Days
    else
    do StuffIfDateIsLessThan60Days
    end

    Gregory Bailey

  6. #6

    Default Re: JulianDate

    Gregory,

    > FirstDate long
    > Comparedate long
    > code
    > FirstDate = date( 10, 1, 2012 ) ! Guessing date is in yyyymmdd format
    > CompareDate = firstDate + 60
    > if DifferentDate > CompareDate
    > do StuffIfDateIsLaterThan60Days
    > else
    > do StuffIfDateIsLessThan60Days
    > end

    That is Clarion code, but Dirk would like to do it in SetupScript :-)
    SetupBuilder supports the "Julian Date" function to calculate the difference
    between two dates.

    Similar to the attached one.

    Friedrich
    Attached Images Attached Images  

  7. #7

    Default Re: JulianDate

    > The Julian Date is calculated from the year 4713 BC

    BC - that's "Before Clarion" - right<g>?

    :-)

    Charles


    --
    -------------------------------------------------------------------------------------------------------
    Charles Edmonds
    www.clarionproseries.com - ProScan, ProImage, ProPath and other Clarion
    developer tools!
    www.ezchangelog.com - "Free ChangeLog software to manage your projects!"
    www.setupcast.com - "A revolutionary new publishing system for software
    developers - enhanced for SetupBuilder users!"
    www.pagesnip.com - "Print and Save the Web, just the way you want it!"
    www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
    and Forms - Now with PNG support!
    www.lansrad.com - "Intelligent Solutions for Universal Problems"
    www.fotokiss.com - "World's Best Auction Photo Editor"
    -------------------------------------------------------------------------------------------------------

  8. #8

    Default Re: JulianDate

    >> The Julian Date is calculated from the year 4713 BC
    >
    > BC - that's "Before Clarion" - right<g>?

    Hehehehe :-)

    Friedrich

  9. #9

    Default Re: JulianDate

    work perfect - thanks

    Dirk Büchel

  10. #10

    Default Re: JulianDate

    >Wolfgang,
    >
    >> is there a JulianDate-Function Clarion?

    >No, there isn't a built-in Julian Date function available in Clarion.

    No wonder that I did not find it.....

    > The
    >Clarion Standard Date is only the number of days that have elapsed since
    >December 28, 1800. The Julian Date is calculated from the year 4713 BC and
    >increments every day since then.

    With the Julian Date you can not only calculate the difference between days,
    but also between hours and minutes.

    The INT( JulianDate ) returns the day, but the fraction of 2456789.123456789
    represents the time.

    I do a lot of scheduling calculation, often over midnight. There is a series of
    articles about Stardate by Doc parker on Clarion Magazine, but I "have not got
    warm with that" - whatever that may have been written in correct english.

    Perhaps I need to delve for that dBase II book again.

    Wolfgang Orth

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •