Simple Date Formulas/Functions

This is a discussion on Simple Date Formulas/Functions within the Excel Questions forums, part of the Question Forums category; I'm trying to create some formulas/functions that give specific date values/formats. For example, if I have a date value stored ...

1. Simple Date Formulas/Functions

I'm trying to create some formulas/functions that give specific date values/formats. For example, if I have a date value stored in a1 as 10/1/2003, I want to write a formula in cell b1 that will give me the month name of the date value in a1 (i.e., October).

Similarly, how would I specify a formula for the day of the week that corresponds to that date (i.e., Saturday)?

Ideally, I would want to create some functions that would give me those values easily.

Thanks.

2. Re: Simple Date Formulas/Functions

I believe you can just use the month function and the weekday functions.

3. Re: Simple Date Formulas/Functions

Welcome to the Board!

See Chip Pearson's Date/Time page: http://www.cpearson.com/excel/datetime.htm

He's got a ton of examples.

Hope that helps,

Smitty

4. Re: Simple Date Formulas/Functions

Hi starman welcome to the board! Yes Joe C is right you but you have to do some extras to turn this into words...

Day of the week
=TEXT(WEEKDAY(A1),"dddd")

Month
Not sure about how to tuen the number into a month. You could have a list 1-12 with names in an adjacent column then do a vlookup to obtain the equiv of the number.

hth

5. Re: Simple Date Formulas/Functions

Originally Posted by starman
I'm trying to create some formulas/functions that give specific date values/formats. For example, if I have a date value stored in a1 as 10/1/2003, I want to write a formula in cell b1 that will give me the month name of the date value in a1 (i.e., October).

Similarly, how would I specify a formula for the day of the week that corresponds to that date (i.e., Saturday)?

Ideally, I would want to create some functions that would give me those values easily.

Thanks.
For the full month name:

=TEXT(A1,"mmmm")

and for the full day name:

=TEXT(A1,"dddd")

6. Re: Simple Date Formulas/Functions

Heres a UDF to do the Month bit ...

Code:
```Option Base 1
Public Function MonthName(MyDate As Date)
Dim i As Integer, MthArray
i = Month(MyDate)
MthArray = Array("January", "February", "March", "April", "May", "June", _
"July", "August", "September", "October", "November", "December")

MonthName = MthArray(i)
End Function```
EDIT: Just use Aladins formulas, you dont need this.

7. Re: Simple Date Formulas/Functions

Originally Posted by starman
I'm trying to create some formulas/functions that give specific date values/formats. For example, if I have a date value stored in a1 as 10/1/2003, I want to write a formula in cell b1 that will give me the month name of the date value in a1 (i.e., October).

Similarly, how would I specify a formula for the day of the week that corresponds to that date (i.e., Saturday)?

Ideally, I would want to create some functions that would give me those values easily.

Thanks.
For the full month name:

=TEXT(A1,"mmmm")

and for the full day name:

=TEXT(A1,"dddd")
Good one Aladin! So you dont need weekday or month functions at all.

8. Re: Simple Date Formulas/Functions

Thanks to all.

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•