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

25 as twenty fifth 1

Status
Not open for further replies.

WTKnow

Programmer
Aug 3, 2006
29
US
Please, wizards how to make Ayug,25 to say 'On a twenty fifth day...' is there way? Thanks
 
First, isolate the day. From a date, you can say DatePart("d", {your.date}), or maybe just Day({your.date}), depending on your version of Crystal.

Then use Crystal's automatic conversion:
Code:
 "On day " & ToWords(@YourDayNumber)

This would give On day twenty five. To get any closer would mean using commands like
Code:
Replace(@DateWord, "five", "fifth"
And so on.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Great but not clear...I need to have not just 25th but any day to convert.
So I need to write formula like

"On day " & ToWords(@YourDayNumber) but what (@YourDayNumber) should be like?
Should I strip Day off the Aug, 25 and make it (@YourDayNumber)formula and then use that in?

Please, let me know if I am missing much?
thanks a lot
 
Glad to have helped. The second command should have been Replace(@DateWord, "five", "fifth"), of course.

[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