Day of Month

P

Powderfinger

Is there a function that returns the day of the month in string format?

In other words, I want

Func(1) = First
Func(2) = Second

..
..
..
..
Funct(30) = Thirtieth

Thamks

Jack
 
F

fredg

Is there a function that returns the day of the month in string format?

In other words, I want

Func(1) = First
Func(2) = Second

.
.
.
.
Funct(30) = Thirtieth

Thamks

Jack

There is no built-in function, but it is easy enough to do yourself.

Create a new table
ID AutoNumber (no duplicates)
DayString Text Datatype
Name this table "tblDayString"

Enter each day string from 1 to 31.
1 First
2 Second
..
..
31 Thirty-first

Then, when ever you need the day number as a string, use
=DLookUp("[DayString]","tblDayString","[ID] = " & Day([DateField]))
 
P

Powderfinger

I was afraid of that. Do you see any mistakes in what I have(before I put
the quotes in)? Should I put a hyphen between the numbers from 21 to 29?
This is going on a graduation certificate which wiill read:

WE HAVE AWARDED THIS CERTIFICATE THIS __________ DAY OF

DayOfMonthArray(1) = First

DayOfMonthArray(2) = Second

DayOfMonthArray(3) = Third

DayOfMonthArray(4) = Fourth

DayOfMonthArray(5) = Fifth"

DayOfMonthArray(6) = Sixth

DayOfMonthArray(7) = Seventh

DayOfMonthArray(8) = Eighth

DayOfMonthArray(9) = Ninth

DayOfMonthArray(10) = Tenth

DayOfMonthArray(11) = Eleventh

DayOfMonthArray(12) = Twelfth

DayOfMonthArray(13) = Thirteenth

DayOfMonthArray(14) = Fourteenth

DayOfMonthArray(15) = Fifteenth

DayOfMonthArray(16) = Sixteenth

DayOfMonthArray(17) = Seventeenth

DayOfMonthArray(18) = Eighteenth

DayOfMonthArray(19) = Nineteenth

DayOfMonthArray(20) = Twentieth

DayOfMonthArray(21) = Twenty First

DayOfMonthArray(22) = Twenty Second

DayOfMonthArray(23) = Twenty Third

DayOfMonthArray(24) = Twenty Fourth

DayOfMonthArray(25) = Twenty Fifth

DayOfMonthArray(26) = Twenty Sixth

DayOfMonthArray(27) = Twenty Seventh

DayOfMonthArray(28) = Twenty Eighth

DayOfMonthArray(29) = Twenty Ninth

DayOfMonthArray(30) = Thirtieth

DayOfMonthArray(31) = Thirty First
 
D

Douglas J Steele

Fred's suggestion of storing the words in a table would probably be better.

Dictionary.com implies that the hyphen should be there (i.e.: they have an
entry for "twenty-nine", but they don't have one for "twenty nine")
 
Top