Combine Columns in excel and format

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
unique12u
Newbie
Posts: 9
Joined: Mon Jan 30, 2006 3:37 pm

Combine Columns in excel and format

Post by unique12u » Mon Jun 05, 2006 3:05 pm

I have an excel file with a date column and a time column. I need to have these two be ONE column in yyyy-mm-dd hh:mm:ss format.

If I concatenate the columns Excel does not want to reformat them as a date because it only treats it as text then.

Any suggestions?

Nique

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Mon Jun 05, 2006 3:37 pm

If the columns contain a date and time stored in excel's numeric format, what you need to do is add them, not concatenate.

For instance my local date and time are:

6/5/2006 8:23:00

if I format the cells as numbers I see:

38873.00000 0.34931

The date is an integer and the time is a decimal.

Add those numbers and select the display format you want:

38873.349306 = 06:05:06 08:23:00

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts