problem:
Function to convert Date into Julian format
solution:
private string Date2Julian(DateTime dt)
{
//julianDate YYYYnnn
// YYYY = 4 digit year
// nnn = number of days since january 1 of YYYY
// Jan 1, 2005 = 2005001
// Dec 31, 2005 = 2005365
//initialize variable
string sJulianDate=string.Empty;
sJulianDate = dt.Year.ToString()+
dt.DayOfYear.ToString().PadLeft(3,'0');
return (sJulianDate);
}
Thursday, February 1, 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment