Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Return double digit month
Is there a way to return a two digit month using the MONTH function? i.e. 01,
02, 03, 04, etc. For example, when I try: Format(Month(dteDate), "MM") It does not return the correct month...how can I get at this? I'm sure I know how to do this, but it's a Monday and I'm dragging... Thanks much in advance. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Return double digit month
Format(Month(dteDate), "00") HTH, Bernie MS Excel MVP "quartz" wrote in message ... Is there a way to return a two digit month using the MONTH function? i.e. 01, 02, 03, 04, etc. For example, when I try: Format(Month(dteDate), "MM") It does not return the correct month...how can I get at this? I'm sure I know how to do this, but it's a Monday and I'm dragging... Thanks much in advance. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Return double digit month
If dteDate is a real date, just use Format(dteDate,"mm")
-- Kind Regards, Niek Otten Microsoft MVP - Excel "quartz" wrote in message ... Is there a way to return a two digit month using the MONTH function? i.e. 01, 02, 03, 04, etc. For example, when I try: Format(Month(dteDate), "MM") It does not return the correct month...how can I get at this? I'm sure I know how to do this, but it's a Monday and I'm dragging... Thanks much in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Return a 3 digit number | Excel Worksheet Functions | |||
add a double digit number together | Excel Discussion (Misc queries) | |||
recognizing double digit numbers in code | Excel Discussion (Misc queries) | |||
Convert 2 digit month to 4 digit years and months | Excel Worksheet Functions | |||
how to convert single digit to month name | Excel Worksheet Functions |