Print Page | Close Window

Help: previous month name

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=8425
Printed Date: 02 May 2024 at 5:51pm


Topic: Help: previous month name
Posted By: Nav522
Subject: Help: previous month name
Date Posted: 20 Nov 2009 at 11:09am
Hello Folks,
                    I am trying to retrieve the name of the previous month. I was able to get the current month name like this "

to_char(sysdate,'FMMon YYYY')

" but finding it hard to get the previous one. Does anybodyy hav any idea about this one.
 
 
Thanks     



Replies:
Posted By: DBlank
Date Posted: 20 Nov 2009 at 11:45am
MonthName(month(dateadd('m',-1,currentdate)))


Posted By: Nav522
Date Posted: 20 Nov 2009 at 11:52am
hey thanks for getting back. It returns with MonthName as Invalid Identifier. Any idea about why its happening.
 
 


Posted By: DBlank
Date Posted: 20 Nov 2009 at 11:55am
Are you using this a s crystal synatx formula and what version of crystal are you using?


Posted By: Nav522
Date Posted: 20 Nov 2009 at 12:05pm

well am creating a report using the sql query through the Command option. I shud pull the previous monthname for the report and we are using BOXIR2 and the server is Oracle server.

 
 
Thanks


Posted By: DBlank
Date Posted: 20 Nov 2009 at 12:16pm
My formula was for a crystal syntax formula.
Not sure for Oracle.
 



Print Page | Close Window