Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: 30 Days from the end of the month Formula Post Reply Post New Topic
Author Message
rjchis
Newbie
Newbie
Avatar

Joined: 13 Jul 2011
Location: Australia
Online Status: Offline
Posts: 2
Quote rjchis Replybullet Topic: 30 Days from the end of the month Formula
    Posted: 13 Jul 2011 at 6:05pm
I am trying to work out 30 days from the end of the month. The problem I am having however is that some are returning the 29th day of the month instead of the 30th.

Date(DateAdd('m',1{ARInvoice.InvoiceDate})-day(({ARInvoice.InvoiceDate}))+tonumber({ARTerms.T ermDays}))

So for example i have the date 15/06/2011 i start by taking the 15 days off back to the start of the month. I then add a month plus 30 days as the term days in this case is 30 days. I want to go to the end of the month and then add 30 days starting from the first of the next month.

Current formula as shown above is returning the following:
Terms InvoiceNo CurrentBalance InvoiceDate DueDate
30 00431837 2,929.72 31/05/2011 29/06/2011 Incorrect (should be 30/06/2011)
30 00431253 2,974.05 19/05/2011 30/06/2011 Correct (30 days from start of next month)

I don't understand why it is correct for most results but a day out on other results. Any help with this problem would be greatly appreciated
IP IP Logged
rjchis
Newbie
Newbie
Avatar

Joined: 13 Jul 2011
Location: Australia
Online Status: Offline
Posts: 2
Quote rjchis Replybullet Posted: 13 Jul 2011 at 8:03pm
This issue has been resolved @ http://businessintelligence.ittoolbox.com/groups/technical-functional/businessobjects-crystal-l/30-days-from-end-of-current-month-date-in-crystal-reports-10-4308170
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.