cancel
Showing results for 
Search instead for 
Did you mean: 

sap b1 crystal report current month first date query

former_member923144
Discoverer
0 Kudos

i want my "from" date parameter in crystal report to be the first date of month mentioned in "to" date parameter.how to do it pls help

former_member763929
Participant
0 Kudos

Thank you for visiting SAP Community to get answers to your questions. Since this is your first question, I recommend that you familiarize yourself with Community Q&A , as the overview provides tips for preparing questions that draw responses from our members.

Should you wish, you can revise your question by selecting Actions, then Edit.

By adding a picture to your Profile you encourage readers to respond.

Accepted Solutions (1)

Accepted Solutions (1)

owaisk
Participant

Hello AliKhan.

--First date of Current Month in Query Parameter

(DATEADD(dd,-(DAY({?to})-0),{?to})) --For the month of the date selected in {?to} Parameter

(DATEADD(dd,-(DAY(getdate())-0),getdate())) -- For the First day of Current Month

--In Formula

Date(year(currentdate), month(currentdate),1)

Thanks.

former_member923144
Discoverer
0 Kudos

thnks it is working

Answers (0)