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
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
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
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
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
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
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
> 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"
-------------------------------------------------------------------------------------------------------
>> The Julian Date is calculated from the year 4713 BC
>
> BC - that's "Before Clarion" - right<g>?
Hehehehe :-)
Friedrich
work perfect - thanks
Dirk Büchel
>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
There are currently 1 users browsing this thread. (0 members and 1 guests)