Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Powerpoint - Change Date Format

Status
Not open for further replies.

icu222much

Technical User
Mar 12, 2007
26
CA
I have a date in a specific format, and I would like to change it to another format. For example, I have the date "15/3/2010" and I would like to convert it to "March 15, 2010".

I have tried using "myDate = Format(Date, "mmmm d, yyyy")", but it seems to only return the current date in specified format as oppose to formatting myDate in the specified format.
 



Hi,

HOW do you have your date? It would be very helpfule if you would post your code, rather than merely describing what happens. It seems that you do not really have a DATE, which is a numeric datatype.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
What about this ?
myDate = Format(myDate, "mmmm d, yyyy")

or this ?
myDate = Format(CDate(myDate), "mmmm d, yyyy")

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Sorry about not posting my code. I am at home right now so I do not have my code available. But this is pretty much the gist of it:

Code:
myDate = myWorkSheet.Cells(x, y).Value
myDate = Format(Date, "mmmm d, yyyy")


What happens is that I am copying data from an Excel spreadsheet to a Powerpoint presentation. In the Excel file, I have a column of dates formatted as Month Date, Year (ie - July 21, 2010). I wrote a macro to extract each date and place them into a text box in Powerpoint. The problem is that when I paste the date in Powerpoint, they are converted into the format Day/Month/Year (ie - 21/07/2010). I believe this is because Excel always stores their date in the format Day/Month/Year, although they can be displayed in any way the user chooses.

PHV: I will try your code when I get into the office first thing tomorrow.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top