Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I need to build two dates: in this year 2013 i like to build 20130101 - 20131231. The next year i need 20140101 - 20141231.
It mean it is only the year i need to caluculate the date and month is static.
//Gunnar
I believe you are getting zero because you didnt open and close the parenthesis after the Today() functions. It should look like this...
sum( {$<AcNo= {'>=3000<=3999'},VoDt= {'>$(=date(yearstart(today()),'YYYYMMDD'))<$(=date(yearend(today()),'YYYYMMDD'))'}>} AcAm)
Everything else looks good as long as the dates are the same format. Is VoDt formatted like YYYYMMDD?
Haushik, your expression will start the year in April. Yearstart would be 20130401 where it should be 20130101, correct?
Hi,
These expressions calculate these dates based on the current year. What are you using them for? Just display or in the script? Let me know if you need more help
Current Year Start and End
Date(YearStart(Today()),'YYYYMMDD')
Date(YearEnd(Today()),'YYYYMMDD')
Next Year Start and End
Date(YearStart(AddYears(Today(),1)),'YYYYMMDD')
Date(YearEnd(AddYears(Today(),1)),'YYYYMMDD')
-art
Thank's for fast answer!
I will use it in expression like this
sum( {$<AcNo= {'>=3000<=3999'},VoDt= {'>Year0101<Year1231'}>} AcAm)
(Year0101 and Year1231 should be 20130101 and 20131231
//Gunnar
Ok. Good luck. Can you give me a 'correct answer' if it works, please.
How can i test result of a single expression?
I i just want to see the result of: Date(YearStart(Today()),'YYYYMMDD')
//Gunnar
Hi,
Try below expression.
sum( {$<AcNo= {'>=3000<=3999'},VoDt= {'>$(=date(yearstart(VoDt,0,4),'YYYYMMDD'))<$(=date(yearend(VoDt,0,4),'YYYYMMDD'))'}>} AcAm)
Regards,
Kaushik Solanki
Hmmm i get 0 with this expression: (Expression is OK, but the result of expression is 0)
sum( {$<AcNo= {'>=3000<=3999'},VoDt= {'>$(=date(yearstart(today),'YYYYMMDD'))<$(=date(yearend(today),'YYYYMMDD'))'}>} AcAm)
I asume i say with this espression:
Sum filed AcAM (Ammount) with AcNo (AccountNr) between 3000 and 3999 and VoDt (VoucherDate) between the start of current year and the end of current year.
/Gunnar
I believe you are getting zero because you didnt open and close the parenthesis after the Today() functions. It should look like this...
sum( {$<AcNo= {'>=3000<=3999'},VoDt= {'>$(=date(yearstart(today()),'YYYYMMDD'))<$(=date(yearend(today()),'YYYYMMDD'))'}>} AcAm)
Everything else looks good as long as the dates are the same format. Is VoDt formatted like YYYYMMDD?
Haushik, your expression will start the year in April. Yearstart would be 20130401 where it should be 20130101, correct?