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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

date to month - Words

Status
Not open for further replies.

jmd0252

Programmer
May 15, 2003
667
We have a birthday list for the H/R department. I have the date borken so that I can group based on month, and then day.
stringvar x := {PM_EMPMASTER.BIRTH_DATE};
datevar birth := date(val(left(x,4)),val(mid(x,5,2)),val(right(x,2)));
Month (birth)
This is my formula to get the month.

Is it possible to convert it to the Months of the year, ie January, etc??
I did the ToWords, opps,, one time 1.00 ,, does not equal January.
 
Try the following:

//Month Text Name
Monthname(Month(birth))


'J

CR8.5 / CRXI - Discovering the impossible
 
Out of interest - Try replacing:

//current formula
stringvar x := {PM_EMPMASTER.BIRTH_DATE};
datevar birth := date(val(left(x,4)),val(mid(x,5,2)),val(right(x,2)));
monthname(Month(birth))

With:

//New formula
Monthname(Month(Date(Picture({PM_EMPMASTER.BIRTH_DATE},'xxxx-xx-xx'))))


Let me know how you get on without declaring the variables.

'J

CR8.5 / CRXI - Discovering the impossible
 
Say what you want,, pretty cool,,, both ways worked..Thanks a bunch
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top