Solved: Converting custom date format into text

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

FernJones

Fern
Thread Starter
Joined
May 30, 2011
Messages
28
Hello,


I have a column of dates that I have formatted like this:
\S\Ayymmdd


The date needs to look like this:
SA160327


This is exactly what I need, except I have to insert these in a csv file, and when I try to copy and paste the date, the formatting is gone, and I just get numbers like this:
42456


Does anyone know how I could copy my dates so that they're just text but in that format?
I'm currently retyping all of them, and I have hundreds....


Any help is much appreciated. Thanks in advance.
Fern.
 

Keebellah

Hans
Trusted Advisor
Joined
Mar 27, 2008
Messages
6,639
If it is Excel you're using then try the following
Create a Costom Date format for these cells: : SAyymmdd

With VBA a macro for those cells

Dim cell as Range
For Each cell in Rangë"D:D")
cell.NumberFormat = "SAyymmdd"
Next cell
 

DaveBurnett

Account Closed
Joined
Nov 11, 2002
Messages
12,970
Just to expand on that, the default date format in Excel is just the number of days since 1st Jan 1980.
 

Keebellah

Hans
Trusted Advisor
Joined
Mar 27, 2008
Messages
6,639
Hi Dave, I don't think that is what the poster means, he is just telling us how the date is displayed and yes, that is the Nr of days since 1980.
 

FernJones

Fern
Thread Starter
Joined
May 30, 2011
Messages
28
Hi,
Thank you so much for all the replies, I really appreciate your help and time.
My file worked great now!
All the best,
Fern.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top