Home

dates in excel wont format correct

%3CLINGO-SUB%20id%3D%22lingo-sub-764933%22%20slang%3D%22en-US%22%3Edates%20in%20excel%20wont%20format%20correct%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-764933%22%20slang%3D%22en-US%22%3E%3CP%3Ei%20had%20a%20spreadsheet%20with%20dates%20formatted%20as%20yyyymmdd%2C%20I%20now%20need%20to%20change%20them%20to%20mm%2Fdd%2Fyyyy.%26nbsp%3B%20before%20starting%20this%20a%20user%20began%20keying%20all%20changes%20in%20the%20new%20format%2C%20so%20when%20you%20looked%20at%20the%20data%20some%20were%20yyyymmdd%20and%20some%20were%20mm%2Fdd%2Fyyyy%2C%20I%20went%20back%20and%20had%20the%20dates%20all%20set%20to%20yyyymmdd%2C%20but%20now%20if%20I%20go%20in%20and%20do%20a%20custom%20format%20for%20mm%2Fdd%2Fyyyy%20I%20get%20the%20******************%2C%2Cany%20thing%20I%20select%20either%20gives%20me%20the%20yyyymmdd%20or%20the%20******************%2C%20I%20cant%20get%20any%20format%20to%20work%20now%3C%2FP%3E%3CP%3EI%20tried%20to%20break%20out%20the%20fields%20and%20conconcate%20them%20back%20but%20still%20cant%20get%20a%20format%20I%20need%20-%20I%20started%20looking%20for%20a%20function%20and%20still%20no%20luck%20-%20if%20I%20can%20get%20back%20to%20a%20good%20starting%20point%20i'm%20ok%20with%20that%20as%20long%20as%20the%20end%20result%20works%20-%20please%20advise%20thank%20you%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-764933%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-765003%22%20slang%3D%22en-US%22%3ERe%3A%20dates%20in%20excel%20wont%20format%20correct%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-765003%22%20slang%3D%22en-US%22%3E%3CP%3EThere%20are%20some%20funky%20logical%20problems%20with%20date%20number%20formats.%3CBR%20%2F%3E%3CBR%20%2F%3ESay%20for%20example%20your%20computers%20default%20date%20format%20is%20dd%2Fmm%2Fyyyy%2C%20you%20use%20the%20%22Date%22%20number%20formatting.%20Someone%20say%20for%20example%20an%20american%20opens%20with%20mm%2Fdd%2Fyyyy%20it'll%20be%20fine.%20The%20%22Date%22%20number%20format%20converts%20the%20serial%20number%20correctly.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20use%20custom%2C%20say%20for%20example%20%22dd-mm-yyyy%22%2C%20it%20will%20force%20that%20format.%20Dates%20like%2012%2F12%2F2019%20are%20super%20awkward%20with%20these%20%22custom%22%20formats.%20You%20must%20follow%20the%20custom%20formatting%20rule%2C%20it%20will%20not%20intelligently%20convert.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYour%20date%20format%20%22yyyymmdd%22%20might%20also%20not%20auto%20apply%20the%20date%20serial.%3CBR%20%2F%3E%3CBR%20%2F%3EFor%20example%2C%20type%20in%2020190719%20to%20a%20cell%20with%20that%20format%20it'll%20%23%23%23%23%20because%20it's%20assuming%20that%20number%20is%20the%20date%20serial%2C%20trying%20to%20convert%20that%20makes%20it%20too%20large.%20Even%20in%20a%20custom%20date%20format%2C%20you%20type%20in%20your%20normal%20date%20format%20(for%20example%20dd%2Fmm%2Fyyyy%20or%20mm%2Fdd%2Fyyyy).%3CBR%20%2F%3E%3CBR%20%2F%3EIt's%20best%20practice%20to%20have%20an%20%22Input%22%20in%20these%20intelligent%20formats%2C%20and%20an%20output%20in%20your%20custom.%20If%20thats%20possible%20that%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you've%20got%20data%20in%20that%20yyyymmdd%20you%20need%20to%20convert%20back%2C%20use%20%22%3DDate%22%20in%20a%20similar%20way.%3CBR%20%2F%3E%22%3DDATE(MID(A1%2C1%2C4)%2CMID(A1%2C5%2C2)%2CMID(A1%2C7%2C2))%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F379080%22%20target%3D%22_blank%22%3E%40kgoldie%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-765521%22%20slang%3D%22en-US%22%3ERe%3A%20dates%20in%20excel%20wont%20format%20correct%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-765521%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F379080%22%20target%3D%22_blank%22%3E%40kgoldie%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%3C%2FP%3E%3CP%3EThis%20could%20be%20fixed%20in%20Power%20Query.%3C%2FP%3E%3COL%3E%3CLI%3EConvert%20your%20data%20into%20a%20table%20(CTRL%20%2BT)%20%26gt%3B%26gt%3B%20Enter%3C%2FLI%3E%3CLI%3EOn%20the%20Data%20Tab%20%26gt%3B%26gt%3B%20Select%20From%20Table%3C%2FLI%3E%3CLI%3EThe%20Query%20Editor%20opens%3C%2FLI%3E%3CLI%3ESelect%20the%20Date%20Column%20having%20the%20Problem%26nbsp%3B%3C%2FLI%3E%3CLI%3EClick%20on%20the%20ADD%20Column%20tab%26nbsp%3B%3C%2FLI%3E%3CLI%3ETo%20the%20right%20side%20%26gt%3B%26gt%3B%20Click%20on%20Date%20%26gt%3B%26gt%3B%20Select%20%22Date%22%3C%2FLI%3E%3CLI%3ENow%20the%20Dates%20are%20fixed%20in%20the%20new%20Column%3C%2FLI%3E%3CLI%3ERight%20Click%20the%20original%20Date%20column%20%26gt%3B%26gt%3B%20remove%20Column%3C%2FLI%3E%3CLI%3EOn%20the%20Home%20Tab%20%26gt%3B%26gt%3B%20Click%20Close%20and%20Apply%3C%2FLI%3E%3C%2FOL%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20that%20helps%3C%2FP%3E%3CP%3ENabil%20Mourad%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
kgoldie
Occasional Visitor

i had a spreadsheet with dates formatted as yyyymmdd, I now need to change them to mm/dd/yyyy.  before starting this a user began keying all changes in the new format, so when you looked at the data some were yyyymmdd and some were mm/dd/yyyy, I went back and had the dates all set to yyyymmdd, but now if I go in and do a custom format for mm/dd/yyyy I get the ******************,,any thing I select either gives me the yyyymmdd or the ******************, I cant get any format to work now

I tried to break out the fields and conconcate them back but still cant get a format I need - I started looking for a function and still no luck - if I can get back to a good starting point i'm ok with that as long as the end result works - please advise thank you

2 Replies

There are some funky logical problems with date number formats.

Say for example your computers default date format is dd/mm/yyyy, you use the "Date" number formatting. Someone say for example an american opens with mm/dd/yyyy it'll be fine. The "Date" number format converts the serial number correctly. 

 

If you use custom, say for example "dd-mm-yyyy", it will force that format. Dates like 12/12/2019 are super awkward with these "custom" formats. You must follow the custom formatting rule, it will not intelligently convert.

 

Your date format "yyyymmdd" might also not auto apply the date serial.

For example, type in 20190719 to a cell with that format it'll #### because it's assuming that number is the date serial, trying to convert that makes it too large. Even in a custom date format, you type in your normal date format (for example dd/mm/yyyy or mm/dd/yyyy).

It's best practice to have an "Input" in these intelligent formats, and an output in your custom. If thats possible that it.

 

If you've got data in that yyyymmdd you need to convert back, use "=Date" in a similar way.
"=DATE(MID(A1,1,4),MID(A1,5,2),MID(A1,7,2))"

 

@kgoldie 

@kgoldie 

Hi

This could be fixed in Power Query.

  1. Convert your data into a table (CTRL +T) >> Enter
  2. On the Data Tab >> Select From Table
  3. The Query Editor opens
  4. Select the Date Column having the Problem 
  5. Click on the ADD Column tab 
  6. To the right side >> Click on Date >> Select "Date"
  7. Now the Dates are fixed in the new Column
  8. Right Click the original Date column >> remove Column
  9. On the Home Tab >> Click Close and Apply

 

Hope that helps

Nabil Mourad

 

Related Conversations
flashing a white screen while open new tab
cntvertex in Discussions on
13 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
22 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
PacketMon Components are not loading in WAC 1909
HotCakeX in Windows Admin Center on
2 Replies