Getting Number of Days from the 1st of the year.
Moderators: chulett, rschirm, roy
Getting Number of Days from the 1st of the year.
I have been trying to get the number of days from the first of the year. I have tried using the Julian Date Function, but it does not appear to be what I was expecting. I have tried several other functions, but they have been unsuccessful. DaysSinceFromDate(%date%,%yyyy-mm-dd%) gives me compilation errors, I guess that the syntax or the source fields I am using may be incorrect. :?:
I would use
(wishing that I could use Iconv & Oconv in PX!!!!! You could always use a BASIC transform stage and utilize the Iconv/Oconv capabilities of the Server edition, but you would lose some of the performance advantages of Px)
Code: Select all
JulianDayFromDate(today())-(JulianDayFromDate("01/01/2005")
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
Didn't people around here learn anything from Y2k?
NEVER EVER HARD CODE VALUES IF YOU CAN HELP IT!
Here's your answer:
This works for 7.1r2 (Just tested this.)
NEVER EVER HARD CODE VALUES IF YOU CAN HELP IT!
Here's your answer:
Code: Select all
YearDayFromDate(StringToDate(field, "%YYYY-%MM-%DD"))