?
Solved

Excel VBA convert date to string

Posted on 2011-02-28
4
Medium Priority
?
2,306 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:Murray Brown
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 30

Accepted Solution

by:
SiddharthRout earned 2000 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:Murray Brown
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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

743 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