Using Concatenate on a date/time field

Chimelle

New Member
Joined
Oct 21, 2015
Messages
8
I have data the is in this format 10/1/2015 09:57:49 AM. I need to change it to be 01-OCT-2015 09:57:49 AM. When I try concatenate for the day I get some weird numbers back. Get the same when I try concatenating the time piece. Any help is greatly appreciated.
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Welcome to the Board!

The important thing to understand about dates and times is that they are actually stored as numbers in Excel, specifically the number of days since 1/1/1900. So time is really just a fraction of the day.

If your entry is entered as date/time and not text, just reformat it to show the way you want.
The CUSTOM FORMAT would be: dd-mmm-yyyy hh:mm:ss AM/PM
The Excel function would look like: =TEXT(A1,"dd-mmm-yyyy hh:mm:ss AM/PM")
(but note that the TEXT function returns a text string).
 
Upvote 0
you have to use the TEXT function, something like this:

.....&TEXT(A1,"DD-MMM-YYYY hh:mm:ss AM/PM")
 
Upvote 0

Forum statistics

Threads
1,215,459
Messages
6,124,947
Members
449,198
Latest member
MhammadishaqKhan

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top