开发者

How can I get the day of the year in crystal reports?

As an example, I think today, Dec 3 would be 337. Which cryst开发者_开发百科al reports function will do that?


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

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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜