Print Page | Close Window

showing month and year

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2022
Forum Name: Data Connectivity
Forum Discription: How to connect to data sources and export reports
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=16201
Printed Date: 21 Apr 2025 at 1:33pm


Topic: showing month and year
Posted By: lamiajoyee
Subject: showing month and year
Date Posted: 17 Apr 2012 at 6:09am
hello i need to make a condition in my report where it will take the values from a sql database that were modified this month. in the db it is stored in this pattern-"April 2012" (for example). how can crystal report detect the month from this string? all i can think of is this. please help


cstr(monthname(month(currentdate)))+"-"+cstr(Year(CurrentDate))



Replies:
Posted By: DBlank
Date Posted: 17 Apr 2012 at 6:25am

if I understood you correctly

{table.field} = totext(currentdate,"MMMM yyyy")


Posted By: lamiajoyee
Date Posted: 17 Apr 2012 at 7:32am
yes, this solved my problem. thank you very much



Print Page | Close Window