473,320 Members | 1,814 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to get JUST month name from a date?

I have a date (such as 10/1/2004). How do I convert it to just "October"?
Thanks.
Nov 18 '05 #1
4 7363
Use format string "MMMM".

Eliyahu

"VB Programmer" <Do*****************@jEmail.com> wrote in message
news:eq**************@TK2MSFTNGP09.phx.gbl...
I have a date (such as 10/1/2004). How do I convert it to just "October"?
Thanks.

Nov 18 '05 #2
DateTime.ToString ("MMMM")

"VB Programmer" <Do*****************@jEmail.com> wrote in message
news:eq**************@TK2MSFTNGP09.phx.gbl...
I have a date (such as 10/1/2004). How do I convert it to just "October"?
Thanks.

Nov 18 '05 #3
Something like:

Dim MyString As String = "10/1/2004"
Dim MyDateTime As DateTime = DateTime.Parse(MyString, new
CultureInfo("en-US"))
Dim Month As String = MyDateTime.ToString("MMMM", new CultureInfo("en-US"))

"VB Programmer" <Do*****************@jEmail.com> wrote in message
news:eq**************@TK2MSFTNGP09.phx.gbl...
I have a date (such as 10/1/2004). How do I convert it to just "October"?
Thanks.

Nov 18 '05 #4
Thanks EVERYONE! Great response and great newsgroup.

"mortb" <mortb1<noospam<@hotmail.com> wrote in message
news:eE**************@TK2MSFTNGP09.phx.gbl...
Something like:

Dim MyString As String = "10/1/2004"
Dim MyDateTime As DateTime = DateTime.Parse(MyString, new
CultureInfo("en-US"))
Dim Month As String = MyDateTime.ToString("MMMM", new
CultureInfo("en-US"))

"VB Programmer" <Do*****************@jEmail.com> wrote in message
news:eq**************@TK2MSFTNGP09.phx.gbl...
I have a date (such as 10/1/2004). How do I convert it to just "October"?
Thanks.


Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: johkar | last post by:
I need to document.write out a select list populated with the dates for the first and third Wednesday of each month. How do I get to the actual days? <select name="mySelect"> <option value="Oct...
4
by: wolftor | last post by:
Month(date) shows the month number. Is there a way to get the month name ie. October? -- Regards, Peter
1
by: Finlay | last post by:
Hi Group I am designing a report that should show a meter reading for each month and the previous meter reading for the previous month. The months are text stored in a field tMonth. The...
13
by: jm | last post by:
I am trying to use datepart to get the real name of the month like "April" or "APR" not just "4." I could not find it in the documentation. Sorry. Thank you.
7
by: MLH | last post by:
Public Function GetLastDayOfMonth(ByVal dtDay As Date) As Date '************************************************************************** ' Accepts a date. Determines month & year of the date....
6
by: Ante Perkovic | last post by:
Hi, How to declare datetime object and set it to my birthday, first or last day of this month or any other date. I can't find any examples in VS.NET help! BTW, what is the difference...
8
by: felecha | last post by:
Is there a control that I can put on a Form that would let a user select just the month value? I tried to find a way to make the DateTimePicker or the Month Calendar do what I want but I can't. ...
20
by: Highlander | last post by:
Hello all. Consider the following HTA: <html> <head> <title>Date Pulldowns</title> <HTA:APPLICATION ID="HTAUI" APPLICATIONNAME="Date Pulldowns" SCROLL="no" SINGLEINSTANCE="yes"
7
by: ajaydesai | last post by:
I have JavaScript code to dispaly two month calendar days at a time, but i have a problem both month that disaplay at a time have same days (for example May and June has same days, June and July have...
0
by: marlberg | last post by:
Platform: Windows2000, WindowsXP, Windows Vista, etc Language: C#, ASP.NET Pre-compiled Libraries: Enterprise Library 3.0 full I have a requirement to implement in and display in C# and...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.