Julian date to normal date

shulbert@littlejohnfrazer.com shulbert@littlejohnfrazer.com
Thu, 6 Mar 2003 17:18:17 +0000


richard,
from powerhouse rules 8.3 page 217:

	In spite of the way JDATE is stored, it is processed internally as a
	six-digit number in the order YYMMDD or an eight-digit number in the
	order YYYYMMDD.

looks like you don't have to do any processing, powerhouse will do it for you, whether you want it to or not.
regards,
stephen.



 -----Original Message-----
From: 	terrycurran@onetel.net.uk [mailto:terrycurran@onetel.net.uk] Sent:	Thursday, March 06, 2003 4:59 PM
To:	rfrench@axiom-systems.com; powerh-l@cube.swau.edu
Subject:	RE: Julian date to normal date


You will probably have to do some work on this. PowerHouse can easily convert a DATE into a Julian Date, but doesn't
seem to do it the other way around, in fact the conversion of DATE to
JDATE is documented in the manuals.

You will probably have to do some manipulation of your Julian Date to
strip out the year and the days part.

DEFINE j-date-year = FLOOR( jdate-field /1000 )
DEFINE j-date-days = MOD( jdate-field,1000 )
DEFINE start-of-year DATE = (j-date-year * 10000) + 101
DEFINE the-date DATE = DATE(DAYS(start-of-year) + j-date-days))

Of course this could probably be condensed into a single statement

DEFINE the-date DATE FORMAT YYYYMMDD = &
 DATE(DAYS((FLOOR(jdate-field/1000)*10000)+101)+MOD(jdate-field,1000)))

I dare say someone will come up with a better solution sonner or later.

-----Original Message-----
From: powerh-l-admin@cube.swau.edu [mailto:powerh-l-admin@cube.swau.edu]
On Behalf Of Richard French
Sent: Thursday, March 06, 2003 2:23 PM
To: powerh-l@cube.swau.edu
Subject: Julian date to normal date




Does anyone know how to convert a julian date ccyyjjj to ccyymmdd within
Quiz or Quick? = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.swau.edu
Subscribe: "subscribe" in message body to
powerh-l-request@lists.swau.edu
Unsubscribe: "unsubscribe" in message body to
powerh-l-request@lists.swau.edu
http://lists.swau.edu/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.swau.edu
Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
Unsubscribe: "unsubscribe" in message body to powerh-l-request@lists.swau.edu
http://lists.swau.edu/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.

 << File: Terence Phillip Curran (terry.curran@towermarsh.co.uk).vcf >> 

The information contained in this communication is confidential and may
be legally privileged. It is intended solely for the use of the
individual or entity to whom it is addressed and others authorised to
receive it.  If you are not the intended recipient you are hereby
notified that any disclosure, copying, distribution or taking of any
action in reliance on the contents of this information is strictly
prohibited and may be unlawful.

Littlejohn Frazer reserves the right to monitor the content of any
message sent to or from littlejohnfrazer.com and its associate domains,
fmi-litjon.co.uk and litjon.co.uk

A list of partners may be inspected at 1 Park Place, Canary Wharf,
London, E14 4HJ

Registered to carry on audit work by the Institute of Chartered
Accountants in England & Wales, and authorised by the Financial
Services Authority to provide financial services