How to convert specified time to GMT/UTC?
Ältere Kommentare anzeigen
i want to convert datetime({'18-Oct-2023 17:40:00' '18-Oct-2023 18:00:00'},'TimeZone','+05:00') to GMT or UTC?
required result below:
'18-Oct-2023 12:40:00' '18-Oct-2023 01:00:00'
Akzeptierte Antwort
Weitere Antworten (1)
Florian Bidaud
am 18 Okt. 2023
Bearbeitet: Florian Bidaud
am 18 Okt. 2023
https://uk.mathworks.com/help/matlab/ref/datetime.html#buhzxmk-1-TimeZone
date = datetime({'18-Oct-2023 17:40:00' '18-Oct-2023 18:00:00'},'TimeZone','+05:00')
datetime(date, 'TimeZone', 'UTC', 'Format', 'dd-MMMM-yyyy hh:mm:ss')
datetime(date, 'TimeZone', 'Europe/London', 'Format', 'dd-MMMM-yyyy hh:mm:ss')
Kategorien
Mehr zu Calendar finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!