Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula to add report field with text and Julian Date

Status
Not open for further replies.

melost

Technical User
May 5, 2005
18
US
Hello,

I've got a field I wish to combine static text, julian day, and vendor number. Can't figure out the Julian day piece. Here's what I have on the control source for an unbound text field with text and Vendor ID. I need to add the Julian day before the Vendor ID. Any ideas?

="D05" & [ Vendor ID]

Thanks,

melost
 
Could you describe, with an example what YOU mean by Julian Date.
 
Hello,

Thanks for responding. For example, 160 is the Julian day for today June 9, 2005. So for this particular field on the report I wish for it to display as such: D051609949

D05 is the static text
160 is the Julian day
9949 is a [Vendor ID]

melost
 
Okay I figured it out, not sure if its the best solution, but I created a Module called JulianDay with the following:

Function CDate2Julian() As String

CDate2Julian = Format(Date - DateSerial(Year(Date) - 1, 12, _
31), "000")

End Function

I then used this with Expression Builder on the query I was using for the report.

melost
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top