1

As an example, I think today, Dec 3 would be 337. Which crystal reports function will do that?

2 Answers 2

3

DateDiff( "d", Date(Year(CurrentDate), 01, 01),CurrentDate) + 1)

+1 Gives means that on Jan 1, it will give you 1 instead of 0.

1
DateDiff("d",DateSerial (year(currentdate)-1, 12, 31),currentdate)

Using CR 8.5 I had to set the start date using the DateSerial function. I had the start date be Dec 31 of the previous year to get an accurate number for today's date.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.