Forum Discussion
sp3124
Sep 22, 2021Copper Contributor
DD/MM/YYYY HH:MM am/pm to MM/DD/YYY MM:HH
I have a date in the form of 22/09/2021 3:07 am This was exported from a database and is stored in text format. I want to change the format such that I can view this as 09/22/2021 03:07. ...
JKPieterse
Sep 23, 2021Silver Contributor
You say exported from a database, why don't you pull the data directly into Excel from that same database? That will give you more control over the format of each column. See: https://support.microsoft.com/en-gb/office/import-data-from-external-data-sources-power-query-be4330b3-5356-486c-a168-b68e9e616f5a
sp3124
Sep 23, 2021Copper Contributor
Hey Jan, the data was pulled into excel from database but it came with that date structure.
- JKPieterseSep 23, 2021Silver ContributorWhich version of Excel are you using and how exactly did you do the import (which item in the menu)?
- sp3124Sep 23, 2021Copper ContributorI am using recent version of office 365.
In the database , when I give a time filter to retrieve data and hit export , a csv file is automatically downloaded .- JKPieterseSep 23, 2021Silver ContributorThen do not open the CSV by a double-click in Explorer, but rather open Excel and use Data, From Text/CSV to open the file using PowerQuery. Then you can set the date and time format to your liking. After setting things up you can next time simply refresh the date when a new export is made.