Created
July 5, 2018 14:51
-
-
Save ueliwechsler/37bae2fe83344e35c55f1a887e47eda3 to your computer and use it in GitHub Desktop.
Shows some ways, how to work with DateTime format in Julia. #Julia #DateTime #time, #Dates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
year, month, day = Dates.yearmonthday(now(Dates.UTC)); hour = Dates.Hour(now(Dates.UTC)) | |
timeNow = DateTime(year,month,day,hour) | |
utc_start = [timeNow:Dates.Hour(1):timeNow+Dates.Hour(n-1)...] | |
timeNow = now(Dates.UTC) | |
utc_start = [Dates.format(value, "yyyy-m-dd HH:00:00") for value in timeNow:Dates.Hour(1):timeNow+Dates.Hour(n-1)] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment