Date and Time format

silentwolf

Well-known Member
Joined
May 14, 2008
Messages
1,216
Office Version
  1. 2016
Hi guys,

just facing problems with an importet file.

Can someone tell me how I need to custom format so it shows the correct time in excel

2017-12-30-09.28.28.937036

so it shows the date and time correctly?

Many thanks for your help!

Albert

<colgroup><col width="176"></colgroup><tbody>
</tbody>
 
Hi, I tried Steve the Fish's solution in post #3 , it worked for me, but I guess there is probably some regional setting you need to change, not just the ; for , replacement.

Here's a slightly different approach . . .
Code:
=DATE(LEFT(A1,4),MID(A1,6,2),MID(A1,9,2))+TIME(MID(A1,12,2),MID(A1,15,2),MID(A1,18,2))

NOTE - this IGNORES the final fraction of a second, in other words rounds the time DOWN to the nearest full second.
If that's a problem for you, there are ways of rounding it differently.
 
Upvote 0

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Hi Gerald,
thanks for your help.
The formula I was able to update to german but how do I need to change the format now..??

Sorry about this.

Thanks
 
Upvote 0
Open the "Format Cells" dialog box, for example by right clicking on the cell.
Select the "Number" option, and then choose "Custom".

Then in the "Type" box, key in a format, such as
YYYY-MM-DD HH:MM:SS

Some of this is probably different in German, sorry !
 
Upvote 0
Hi Gerald,

many thanks for your help! Much appreciated! And yes I did work it out the englisch german translation :)
It is a bit different but all good now!

Cheers
 
Upvote 0

Forum statistics

Threads
1,215,475
Messages
6,125,028
Members
449,205
Latest member
Eggy66

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