Forum

Convert a date with...
 
Notifications
Clear all

Convert a date without slashes into a Date column

3 Posts
2 Users
0 Reactions
638 Views
(@ozraza)
Posts: 2
New Member
Topic starter
 

Hi Experts

I am a newbie to the whole power thingie and have come across a problem, that I am unable to solve.

I have an Excel file in which I have dates entered as numbers without the slashes to separate it

i:e: dates are entered as 1082019 or 14092019

 

I am trying to transform this data in Power Query Editor

 

My question is how do I convert these numbers into a DD/MM/YYYY format?

I have tried to create a Custom Column as below but I am getting an error

Capture.JPG

Can someone please help me... Any help would be much appreciated

Regards

Raza

 
Posted : 11/12/2019 2:35 am
(@bluesky63)
Posts: 162
Estimable Member
 

Hi Raza,

I can only use 14092019 as an example,  please see attached,   you will need to use Transform > Split Column,   first split number of characters =4  then split further 1409 into 14 & 09,   then use custom column 

[Date.1.1]&"/"&[Date.1.2]&"/"&[Date.2]    to achieve the date format that you want,  take note that in the end need to change type to date

 

This is assumed that whole column are with DDMMYYYY format then you can use the applied steps to convert all,  however if there is date-liked type 1082019,   it can be  DDMYYYY  or DMMYYYY,   so this is consider dirty entries as you won't know exactly what the input guy date format

if the column is a date column is in  20/09/2019  for e.g.  and you want to convert to "MMM-yyyy“   (M must be Upper case,  D and Y lower case),  you can use

Date.ToText([Date], "MMM-yyyy")

if you need my help further,  kindly upload a sample dataset and I can work on it

 
Posted : 11/12/2019 9:06 am
(@ozraza)
Posts: 2
New Member
Topic starter
 

Hi Chris

Thank you for replying

It's works for me as it is

Thank you very much for your help

Appreciate it

Raza

 
Posted : 11/12/2019 10:59 pm
Share: