Neil, FYI you can also store it as an normal date and then switch it in the CF code with: dayofyear(date)
This is the "calendar" Julian date vs. the "true" Julian date. Also, HOF has a CF-Server and a SQL list where you might get better responses for these questions. HTH Stephen -----Original Message----- From: Robertson-Ravo, Neil (REC) [mailto:[EMAIL PROTECTED]] Sent: Friday, October 11, 2002 11:42 AM To: CF-Talk Subject: RE: Default Julian date in SQL Server ah, doesnt matter, I found a UDF for it (SQL2000 only) UDF : Julian Date --CONVERT to Julian date CREATE FUNCTION [dbo].[ToJulDate] (@month smallint,@day smallint,@year smallint) RETURNS INT AS BEGIN DECLARE @jdate int SELECT @jdate = (@year - 1) * 365 - @year/100 + @year/400 + (@year - 1 ) / 4 IF @month > 2 AND ( ( @year%100 != 0 AND @year%4 = 0 ) OR @year%400 = 0 ) SELECT @jdate = @jdate + 1 SELECT @jdate = @jdate + 31 * ( @month - 1 ) + @day IF ( @month > 2 ) SELECT @jdate = @jdate - 3 IF ( @month > 4 ) SELECT @jdate = @jdate - 1 IF ( @month > 6 ) SELECT @jdate = @jdate - 1 IF ( @month > 9 ) SELECT @jdate = @jdate - 1 IF ( @month > 11 ) SELECT @jdate = @jdate - 1 RETURN @jdate END --CONVERT FROM Julian date CREATE FUNCTION [dbo].[JulDate] (@Date int) RETURNS datetime AS BEGIN RETURN(DATEADD(DAY,@Date - 722815,'1/1/80')) END -----Original Message----- From: Robertson-Ravo, Neil (REC) [mailto:[EMAIL PROTECTED]] Sent: 11 October 2002 15:55 To: CF-Talk Subject: Default Julian date in SQL Server Anyone know how to set a default date in Julian Date format within SQL Server...? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm

