Convert Text to Date/Time in Power Query

preview_player
Показать описание
#powerquery #power_query
Syntax
=DateTime.FromText(text, [Format="xxx", Culture="xxx"] )

Character(s) Meaning Example
d day 3
dd day 03
ddd weekday Wed
dddd weekday Wednesday
MM month 06
MMM month Jun
MMMM month June
yy year 23
yyyy year 2023
h hour (1-12) 5
hh hour (1-12) 05
H hour (0-23) 5
HH hour (0-23) 05
m minute 4
mm minute 04
M month 6
s second 2
ss second 02
t AM/PM P
tt AM/PM PM

Code | Description | Format Example
en-US | English - United States | 4/3/2023 10:56:12 AM
en-GB | English - United Kingdom | 03/04/2023 10:56:12
fr-FR | French - France | 03/04/2023 10:56:12
fr-CA | French - Canada | 2023-04-03 10:56:12
es-ES | Spanish - Spain | 03/04/2023 10:56:12
es-MX | Spanish - Mexico | 03/04/2023 10:56:12 a.m.
de-DE | German - Germany | 03.04.2023 10:56:12
it-IT | Italian - Italy | 03/04/2023 10.56.12
ja-JP | Japanese - Japan | 2023/04/03 10:56:12
ko-KR | Korean - Korea | 2023-04-03 오후 10:56:12
zh-CN | Chinese - China | 2023/4/3 10:56:12
zh-TW | Chinese - Taiwan | 2023/04/03 上午 10:56:12
pt-PT | Portuguese - Portugal | 03-04-2023 10:56:12
pt-BR | Portuguese - Brazil | 03/04/2023 10:56:12
ru-RU | Russian - Russia | 03.04.2023 10:56:12
ar-SA | Arabic - Saudi Arabia | 03/04/2023 10:56:12 ص
tr-TR | Turkish - Turkey | 03.04.2023 10:56:12
nl-NL | Dutch - Netherlands | 03-04-2023 10:56:12
pl-PL | Polish - Poland | 03.04.2023 10:56:12
sv-SE | Swedish - Sweden | 2023-04-03 10:56:12
fi-FI | Finnish - Finland | 3.4.2023 10.56.12
nb-NO | Norwegian Bokmål - Norway | 03.04.2023 10:56:12
da-DK | Danish - Denmark | 03-04-2023 10:56:12
hi-IN | Hindi - India | 03-04-2023 10:56:12 पूर्वाह्न
he-IL | Hebrew - Israel | 03/04/2023 10:56:12
hu-HU | Hungarian - Hungary | 2023. 04. 03. 10:56:12
id-ID | Indonesian - Indonesia | 03/04/2023 10.56.12
vi-VN | Vietnamese - Vietnam | 03/04/2023 10:56:12 SA
Рекомендации по теме
Комментарии
Автор

Hey Josh, great video. I hava almost similar problem. perhaps you can helf me. I export a table from a system. And this Table has a column with "Duration" its a Text Cloumn. Sometime the value is " 05:20" ( 5 Min and 20 seconds) and sometimes "1:20:40" ( 1 Hour and twenty minutes and 40 seconds) . But because its a text column i cant summarize or make calculation. Can you help me. How can i solve this problem in excel or with power query? thank you very much. Regards melih

bentatlim