Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need only month from date

Status
Not open for further replies.

sbcsandhu

Programmer
Jul 3, 2007
113
US
what is the formula i would use in crystal xi , so i only grab the month
example

20071103

i would like to create a formula that say 11
 
mid(totext({YourField},0,""),5,2)

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
month(date((picture("20071103","xxxx,xx,xx"))))

works too

_____________________________________
Crystal Reports XI Developer Version
Intersystems Cache 5.X ODBC connection

 
Month({your.date})

THis also works for Year. To get the day for calculations, use DatePart, which gives lots of other values. For display, there are options like
Code:
ToText({Your.Date}, "yy-MM")

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top