Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 581
  • Last Modified:

Crystal reports month formula

I need a formula that looks at a date like 03-13-2012 and tells me what month it is.  

If datefield starts with 03 then March, kind of formula.
0
TomBalla
Asked:
TomBalla
1 Solution
 
CrashmanCommented:
formula
for date

ToText(CurrentDate,'dd-MM-yyyy')

ToText(CurrentDate,’MMM’)       “Oct”
ToText(CurrentDate,’MMM’)       “October”
ToText(CurrentDate,’MMMM yyyy’)       “October 2010"
ToText(CurrentDate,’MMMM, yyyy’)       “October, 2010"
0
 
mlmccCommented:
Is it a date field or a string?

If it is a date then use the above as
   ToText({YourDateFIeld}, 'MMM')

If it is a string then

    MonthName(Val(Left({yourDateString},2)))

or

    MonthName(Val(Left({yourDateString},2)),True)

mlmcc
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now