Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Getting Month Name

I've tried a few different ways in this macro to get the 05 to resolve to
"May" (06="June",...) but it still seems to want to remain as "05". What am
I missing here?

Sub LoadData(dt As String) 'dt comes in like 0505

mmyy = Trim(dt)
fulldate = Mid(mmyy, 1, 2) & "/01/20" & Mid(mmyy, 3, 2)
MsgBox (Format(Month(fulldate), mmm))
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Getting Month Name

Try something like

Debug.Print Format(DateSerial(1900, 5, 1), "mmmm")


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"kmbarz" wrote in message
...
I've tried a few different ways in this macro to get the 05 to
resolve to
"May" (06="June",...) but it still seems to want to remain as
"05". What am
I missing here?

Sub LoadData(dt As String) 'dt comes in like 0505

mmyy = Trim(dt)
fulldate = Mid(mmyy, 1, 2) & "/01/20" & Mid(mmyy, 3, 2)
MsgBox (Format(Month(fulldate), mmm))



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
count month when date is in day/month/year format ccKennedy Excel Worksheet Functions 6 April 30th 09 03:32 AM
excel to make the days cary over month to month automaticly GARY New Users to Excel 1 April 19th 08 06:05 PM
Excel 2003 month to month data change grid Chad[_2_] Excel Discussion (Misc queries) 2 February 15th 08 01:36 AM
Retrieve data for previous 3, 6, 12 month given current month GB Excel Worksheet Functions 4 July 19th 07 11:58 PM
transfer cell $ amount to other sheet month-to-month without overc Colin2u Excel Discussion (Misc queries) 1 July 28th 05 02:36 AM


All times are GMT +1. The time now is 04:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"