Missing an end quote in the second example....
-----Original Message-----
From: Robert Everland [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 25, 2002 12:46 PM
To: CF-Talk
Subject: RE: Julian Date Format output 0YYDDD
#julian(101001, "MM/dd/yyyy")# =01/01/2001 and #julian("01/01/2001)# =
101001
Robert Everland III
Web Developer Extraordinaire
Dixon Ticonderoga Company
http://www.dixonusa.com
-----Original Message-----
From: Charles Nahm [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 25, 2002 2:04 PM
To: CF-Talk
Subject: RE: Julian Date Format output 0YYDDD
Thank you Robert.
Could you provide a small usage sample for the function?
Would it be like:
JDate = '#Julian(Now(), '0YYDDD')#'
Thanks,
Charles Nahm
>-----Original Message-----
>From: Robert Everland [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, June 25, 2002 12:36 PM
>To: CF-Talk
>Subject: RE: Julian Date Format output 0YYDDD
>
>
>Here is what I have
>
><CFSCRIPT>
>/**
> * Returns a gregorian date if a julian date is submitted, or returns a
>julian date if a gregorian date is submitted.
> *
> * @param date
> * @param outvar
> * @return Returns a date.
> * @author Robert Everland III ([EMAIL PROTECTED])
> * @version 1, January 10, 2002
> */
>function julian(date, date_format)
>{
> if (isnumeric(date))
> {
> if (len(date) eq 5)
> {
> date = 0 & date;
> }
> if (left(date,3) LT 100)
> {
> yr = "19" & right(left(date,3),2);
> }
> else
> {
> yr = "20" & right(left(date,3),2);
> }
> days = right(date,3)-1;
> firstday = "1/1/" & yr;
> return
dateformat(dateadd("d",days,firstday),date_format);
> }
> else if (isdate(date))
> {
> date = dateformat(date, "mm/dd/yyyy");
> if (year(date) eq 1999)
> {
> return "0 & left(99000+Dayofyear(date),5)";
> }
> else
> {
> return
>left(1&right(date,2)&right(00&Dayofyear(date),3),6);
> }
> }
> return "Not a valid date";
>}
></CFSCRIPT>
>
>Robert Everland III
>Web Developer Extraordinaire
>Dixon Ticonderoga Company
>http://www.dixonusa.com
>
>-----Original Message-----
>From: Charles Nahm [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, June 25, 2002 12:41 PM
>To: CF-Talk
>Subject: RE: Julian Date Format output 0YYDDD
>
>
>>-----Original Message-----
>>From: Jim Vosika [mailto:[EMAIL PROTECTED]]
>>What is julian exactly? Just curious? Please give an example.
>
>Some archaic Unix based date format from what I can see. It is still
>used by some banks.
>
>The format is 0YYDDD, so today would be 002150 (assuming there
>have been 150
>days total this year).
>
>Regards,
>Charles Nahm
>
>
>
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists