Convert a Text String Date to Date Serial Number In previous posts I’ve been going through some formulas designed to extract and convert a text string Date, to a. Nov 07, 2005 Convert date serial to date? Discussion in 'Microsoft Access External Data' started by Guest, Nov 7. The problem that I have been having is that when I convert a date into text, it changes it into a date serial (i.e. Changes 03/12/02 into. Export serial date to excel as a string. Serial Comms - Interface. Inport data from a serial.
Converting a serial number date to a date format
So I've been messing with a formula to export data from a table to make a formatted list and while I've got advice about that in this subreddit, my dates seem to be converting into the date serial numbers when the info from the date cell is exported into the list.
I don't know how to better explain it than with a picture, so here it is:
Changing the cell format doesn't do anything, whether I set it to text or date, or any other option. What I need is for the date to be copied the same way it is in the date column instead of converting to a serial number.
Excel Date Showing As Number
Also, after that, it would be great if I could automatically copy the data into another document, but to do that I would need it to be formatted slightly differently. So instead of:
name: Julian, date: 23-03-01, notes: N/A
I would prefer it to be:
name: Julian
date: 23-03-01
notes: N/A
with line breaks instead of commas as dividers.
I appreciate any help
I have an 8 digit number that tells me the date, YYYYMMDD. How can I convert this number into a date that Excel will recognize as a date.
Let's assume cell A1 has 20120229 in it...what do I do?
3 Answers
Since you tagged this question VBA, I assume you want an answer in VBA, so here you go:
Use this formula: =DATE(LEFT(A1,4),MID(A1,5,2),RIGHT(A1,2))
where A1 is the cell coordinate.
I like being able to select text in excel and call a macro to do the work.