CurDate = #5/18/01#
Format(CurDate, "yy"

& Trim(Str(DateDiff("d", "1/1/" & Year(CurDate), CurDate)+ 1))
Not any real difference, but this may be easier to "de-Code".
Format(CurDate, "yy"
Format always returns a string. This returns the last two digits of the year. THE "01" at the beginning of your julian date.
Trim(Str(DateDiff("d", "1/1/" & Year(CurDate), CurDate)+ 1))
Worknig sort of, from the inside out.DateDiff returns a number. We'll get back yto date diff momentarily.
Because datediff returns a number, we need to get the string representation. Whhen you get the string of a number, it MAY have a leading space - which was 'reserved" for the sign however, if the sign was "+", it is 'assumed" and not shown, so the string has the space - but not the actual character. Trim removes the (possible) leading space.
Datediff is truly versitile, so I will not attempt to cover any more than is necessary to ubderstand this use.
DateDiff (as previously noted) always returns a number. In this useage, the number is the number of "d"ays between the two supplied dates.
"1/1/" & Year(CurDate),
AND CurDate)+ 1
the first of these is just new years day of the year. the "1/1/" represents January (First Month) and 1 the first daay of the month, while Year(CurDate) is the year of the date being used. In the example, I just placed it in a variable "CurDate"
CurDate + 1 is just the date used in the example, while the + 1 is just the normal arith adjustment to include the end points in the difference calculation. The overall effect is to return the number of DAYS from the beginning of the year to the (Example) date, or the "138" part of your julian date.
MichaelRed
redmsp@erols.com
There is never time to do it right but there is always time to do it over