Solved

Excel VBA convert date to string

Posted on 2011-02-28
4
2,158 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
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.

832 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