Thank you Razzak. This works for the current month, however, the user isn't always looking at the current month. They can enter any date.
On Wed, Feb 1, 2017 at 8:22 AM, A. Razzak Memon <[email protected]> wrote: > Kaleb, > > Here's how ... > > To get the first and last day of the current month: > > -- Get the first and last date of current month > CLEAR VARIABLES vStartDate,vEndDate > SET VAR vStartDate DATE = NULL > SET VAR vEndDate DATE = NULL > SET VAR vStartDate = (RDATE((IMON(.#DATE)),1,(IYR4(.#DATE)))) > SET VAR vEndDate = ((ADDMON(.vStartDate,1))-1) > RETURN > > You can also design a cool form to get the first and last date of current > month without user input. > (See attached). > > Very Best R:egards, > > Razzak > > > > At 09:06 AM 2/1/2017, Kaleb Wade wrote: > > I am trying to set two variables using one date given by user. Whatever >> date is given by user, >> I want to find the first date of the month and the last date of the >> month. Below is a simplified >> version of what I am trying to do. >> >> FILLIN vdate1 USING 'ENTER THE DATE :' >> >> SET VAR vdate3 = (RDATE((IMON(.vdate1)),01,(IYR(.vdate1)))) >> SET VAR vdate4 = (RDATE((IMON(.vdate1)),31,(IYR(.vdate1)))) >> >> The first date of the month is working fine. I cannot figure out how to >> get the last date of the >> month, since there are a different number of days in each month. >> >> Does anyone have a suggestion? >> > > > -- > You received this message because you are subscribed to a topic in the > Google Groups "RBASE-L" group. > To unsubscribe from this topic, visit https://groups.google.com/d/to > pic/rbase-l/H4IA4tvwls8/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- *Kaleb Wade, *Head of Operations 2600 N. Stemmons Frwy., Ste. 117 Dallas, TX 75207 Ph: (214) 638-0484 │ Fx: (214) 630-5140 *kdstudio.com* <http://kdstudio.com/> <http://www.kdstudio.com> <https://www.facebook.com/kdconservatory/> <https://twitter.com/KD_Conservatory> <https://www.instagram.com/kd_conservatory/> <https://www.youtube.com/user/KDStudio1> -- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

