Solved

Excel VBA convert date to string

Posted on 2011-02-28
4
2,130 Views
Last Modified: 2012-05-11
Hi

I have an Excel cell that holds a date in the format 2010/11/08.
How do I convert this to a string value 08-Nov-10
0
Comment
Question by:murbro
4 Comments
 
LVL 30

Accepted Solution

by:
SiddharthRout earned 500 total points
ID: 34996468
Lets say the date is in cell A1

then try this

Msgbox Format(Range("A1").Value,"dd-mmm-yy")

Sid
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 34996507
=TEXT(B11,"dd-mmm-yy")

Saqib
0
 

Author Closing Comment

by:murbro
ID: 34996543
Thanks very much
0
 
LVL 3

Expert Comment

by:LFLFM
ID: 34996585
http://www.mrexcel.com/forum/showthread.php?t=70772

MYSTRING=FORMAT(Range("A1").Value,"yyyymmdd")

Open in new window

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now