Converting dd/mm/yyy hh:mm to yyyymmddhhmmss

digger2640

New Member
Joined
Sep 16, 2014
Messages
1
Hi there,

I have been searching high and low for an answer to this and I cannot find anything. :(

The situation is this:

I have a csv file that contains a date and time column. The date and time is formatted in "dd/mm/yyy hh:mm" (eg: 26/08/2014 22:11). This date is related to a the date and time a form was submitted by a user.

The macro I have been writing I can convert to entire column to format the cells as yyyymmddhhmmss to create a 'unique' number and this works fine, however even after I have converted it to look like 20140826221124 (the 24 refers to the seconds) in the actual column, it still shows as "26/08/2014 10:11:24 PM".

When I save the csv file the date and time is saved as 20140826221124. No problems so far.

However, if the csv file is opened and the macro run again, it will convert the date and time column to a long line of ##############################.

The hashes are displayed, there is no number at all.

So my question is, how can I get the converted 20140826221124 to just be a number with no reference to date and time.

Gosh I hope this makes sense. Thank any of you in advance for any assistance.
 

Some videos you may like

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

Watch MrExcel Video

Forum statistics

Threads
1,109,032
Messages
5,526,358
Members
409,697
Latest member
christopherlewis1620

This Week's Hot Topics

Top