Solved

Excel VBA convert date to string

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

791 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