Questions tagged [iso8601]

ISO 8601 is the International Standards Organization's standard for representing time as a string. It covers dates, times, timezones, durations, and many other things.

Filter by
Sorted by
Tagged with
0 votes
1 answer
16 views

How can I overwrite Echarts month abbreviation / locales

I want to modify the langDE-locales for echarts [1], as it does not follow ISO 8601 in german translation for march: What is the best way to modify it directly in the chart object? My idea was to ...
  • 305
0 votes
1 answer
53 views

java - get the first monday in ISO year

I want to get the day on which the first Monday of a specific ISO year will be. I have an int variable representing the year, and I want to compute a LocalDate representing the first Monday in that ...
1 vote
0 answers
39 views

Obsidian variables - how to capture negative dates (i.e. years "BC")?

My goal is to capture historical dates (both AD and BC) in the files' YML frontmatter that I can then query in dataview like this: ```dataview TABLE without ID file.link as People, dob AS "Date&...
  • 3,476
-1 votes
0 answers
69 views

How is a django date time field saved in a database?

Is the format of a django datetime in a SQLite database converted to text to be an ISO-8601 string?
  • 67
1 vote
1 answer
76 views

jq/fromdateiso8601 discrepancy on MacOS/Ubuntu

I run following two commands on both MacOS and Ubuntu : jq -n '"1971-08-01T01:00:00Z" | fromdateiso8601' jq -n '"1972-08-01T01:00:00Z" | fromdateiso8601' On MacOS, they give ...
  • 18k
1 vote
1 answer
40 views

How can I save Time data to csv file using write_csv without T or Z character?

I'm trying to save some time information included data with write_csv. But it keeps showing T and Z character (ISO8601 format as I know). For example, 2022-12-12 08:00:00 is shown as 2022-12-12T08:00:...
0 votes
1 answer
106 views

Conversion of ISO datetime string to pl.Datetime failure

I have a dataframe containing a timeseries, one column being ISO 8601 datetime strings of the form 2020-12-27T23:59:59+01:00. This is a long running timeseries spanning multiple timezone offset ...
  • 1,386
0 votes
1 answer
65 views

Convert Text(Date in ISO 8601 format) to DateTime - Data Studio

I need to convert a text that is in ISO 8601 Date format, to DateTime in DataStudio. When the text comes with the hour and timezone parts having non-zero values, it works normally. Code to convert: ...
0 votes
1 answer
34 views

Which directive to use to parse Z in time string? [duplicate]

If I use fromisoformat (in Python3.11), then Z is parsed as UTC: In [15]: dt.datetime.fromisoformat('2020-01-01T03:04:05Z') Out[15]: datetime.datetime(2020, 1, 1, 3, 4, 5, tzinfo=datetime.timezone.utc)...
0 votes
1 answer
41 views

How to convert JSON timestamp to time using Jinja?

I have this simple JSON: { "ts": "2022-07-17T09:24:21.840227" } and I would like to know what date it is using Jinja. I tried these two variations: {{ ts | iso8601_to_time | ...
-1 votes
1 answer
49 views

Convert a week into a datetime when the year contains 2 times 52 weeks

For my project, I need to convert year, week and day of week in DateTime. For this, I use this link : https://github.com/dotnet/runtime/blob/b41f1c5f2fde25d752d857a54c3af24145060cdd/src/libraries/...
  • 11
-1 votes
1 answer
29 views

Excel time format 2019-01-20T08:00:00-02:00 (or ccyy-mm-yyThh:mm:ss-timezone)

I am required to use ISO8601 date time format on Excel. Example 2019-01-20T08:00:00-02:00 (or ccyy-mm-yyThh:mm:ss-timezone). Let us say that I use this in cell A1. In cell B1, I would like to add 1 ...
0 votes
1 answer
33 views

How to sort list of object by ISO8601

I've got a list of object which after looping I'm trying to sort the final list by given ISO8601 format favouriteDateTime: 2022-12-16T10:46:55.551Z. There are mutiple sorting method but which one to ...
1 vote
0 answers
44 views

How do I parse iso8601-2004 datetimes into datetime following current iso8601 standard [duplicate]

I am currently making request to an API which include the 24:00 as a valid datetime. Meaning a possible response from a get request might be 2022-11-21T24:00:00.000Z Which I cannot parse into a System....
0 votes
1 answer
186 views

how to convert datetime with timezone to UTC datetime?

I have a string datetime as - '2022-12-07T13:30:14+00:00' and '2022-12-07T13:30:07.697000+00:00' How can I convert the + timezone to UTC time and get output in both the cases as - "2022-12-07T13:...
-2 votes
1 answer
136 views

Convert unix microseconds to ISO 8601 date time string in C++

Problem: I got a signed integer 64-bit variable of unix time with microseconds. I want to convert that to ISO 8601 Date time format. The format must be stored in a string in C++. Notice that this is ...
  • 2,198
0 votes
0 answers
32 views

Dealing with trailing decimals at the end of a DateTime

I am trying to convert the string below into a datetime object using datetime.strptime, and I just can't seem to figure out .746Z at the end. datetime_str = '2022-04-21T08:17:49.746Z' datetime_object ...
1 vote
2 answers
44 views

how to sort a list of data by ISO8601 format

I've got a list of data which also contains ISO8601 DateTime format. How can I sort it by time not date? [2022-12-06T22:37:49.292343, 2022-12-06T18:37:49.300045, 2022-12-06T15:37:49.307976]
0 votes
1 answer
194 views

Convert String Date(mm/dd/yyyy) to ISO format for MongoDB Query, Java [closed]

how can we convert string with format mm/dd/yyyy to Date ISO format, which can be passed as an input to mongo db Query using java ? eg: Input format for string is 11/30/2022 which needs to converted ...
  • 137
0 votes
1 answer
232 views

Python datetime.fromisoformat requires colon in tzinfo?

I am parsing date+time values in isoformat generated by another application, which look like this: "2022-07-31T01:51:05-0400" Note: The time zone info part is "-0400", without a ...
0 votes
0 answers
27 views

How to call ICU APIs to give ISO date time format instead of default locale based values

Like to get ISO date-time value for option day of week. https://unicode-org.github.io/icu/userguide/format_parse/datetime/ e local day of week example: if Monday is 1st day, Tuesday is 2nd ) e or ee ...
  • 1
6 votes
4 answers
2k views

How to get the date and time in format 2022-10-03T19:45:47.844Z in Java

I need the current system date and time in 2022-10-03T19:45:47.844Z format in a java class. I tried using the zoneddatetime and simple date format but couldn't get the write syntax or code from online....
0 votes
1 answer
44 views

Mysql how to order by an ISO duration column

I have a column that stores ISO 8601 durations. eg: P1D P1W P1M P6M P1Y etc I am trying to find a simple way to order by this column ASC SELECT duration FROM durations ORDER BY duration ASC current ...
-1 votes
1 answer
77 views

How to convert specific format date with msk time zone to another format? [duplicate]

I'm trying to format date in Java. I need this format: 2017-06-10T12:38:15.687+03:00 How correctly convert this from standard Date format which I have got in a String? Tue Jun 18 00:00:00 MSK 2024
-2 votes
1 answer
136 views

Java LocalDateTime dropping zeros while parsing? [duplicate]

I am tying to parse a String into LocalDateTime and back the other way around. But the parser is dropping the zeros of the seconds section of the time. This question is related (Not the same) to this ...
  • 149
0 votes
0 answers
68 views

How to compare ISO 8601 date in laravel eloquoent?

I have stored the start date & end date in ISO 8601 format in the MySQL database. Now, How can I compare the date range in ISO 8601 format in Laravel eloquent? example: $data1 = DoctorTimeSlot::...
0 votes
0 answers
51 views

Swift ISO8601DateFormatter TimeZone

I receive a string timestamp from JSON formatted as follows: "2022-10-06T19:10:00.000Z" I want to convert the string to my local timezone and possibly even reformat the whole thing to ...
  • 113
4 votes
2 answers
233 views

Is there an implemented way to convert ISO 8601 period to a translated string readable by humans in Java?

Is there a way to convert a string given in ISO 8601 period format to a format readable by humans and also translated to specified language? Example: P1W --en--> 1 Week P2W --en--> 2 Weeks P1W -...
  • 91
1 vote
2 answers
461 views

What datetime format is this 2022-04-05T12:39:34.579775Z and how to convert to US date time format?

What datetime format is this 2022-04-05T12:39:34.579775Z and how to convert to US date time format but in GMT timezone with a formula in Google Sheets when it appears in A1 and I want to return ...
0 votes
0 answers
29 views

ISO 8601 week number - Custom week start day? [duplicate]

I'm looking for some guidance on how to proceed with a scheduling problem I'm facing. At a high level the problem involves scheduling 'events' such that for a given week number (1-52/53), an event is '...
0 votes
0 answers
47 views

Plotting data in Python with csv with timestamp in ISO 8601

I am new to programming in python. I have a csv where the first column has the following format with ~thousand entries: '1.7314453125, 2022-09-15T18:17:55.444' How can I plot the data?
  • 1
0 votes
1 answer
180 views

openssl using -dateopt causes "Invalid date format: iso_8601" error

How to set the option -dateopt for the openssl properly? An example of a self signed certificate generation: openssl req \ -x509 \ -days 10 \ -nodes \ -newkey rsa:2048 \ -keyout "$PWD/self.key&...
  • 5,344
1 vote
1 answer
41 views

Create Time object with miliseconds in ruby

I want to have a Time object that can be converted into the iso8601 format: "2022-10-01T22:38:45.100Z" I tried this: Time.utc(2022, 10, 1, 22, 38, 45, 100).in_time_zone.iso8601(3) but this ...
1 vote
2 answers
241 views

Convert ISO 8601 string to time format r

Have a dataset yt_videos I scraped from YouTube id Duration 01 PT5M28S 02 PT10M 03 PT1H2M21S 04 PT1H54M 05 PT1H27S The duration column represents the length of the video in hour, minutes and ...
0 votes
1 answer
99 views

Regex expression for ISO 8601 duration

I've been looking at ISO 8061 Wikipedia - https://en.wikipedia.org/wiki/ISO_8601#Durations I want to create a regex so that: Allowed Input P1Y // date component only P5W Not Allowed Input P1Y5W // ...
  • 3
-2 votes
2 answers
1k views

How to convert ISO8601 in flutter [duplicate]

How to convert below ISO8601 format into just month and day. 2022-08-29T10:33:49.283Z to 29/8
4 votes
4 answers
262 views

Haskell get current time as ISO8601 string

I've tried several things I could find online to print the current time as an ISO8601 string, but none of them have worked: This SO answer assumes you already know how to get the current time, but I ...
  • 356
-2 votes
1 answer
645 views

how to convert ISO 8601 to Date time(Utc) in Python

I have time stamp in ISO format "2022-06-19T00:00:00+00:00" and want to convert it in to Date time(utc) format "Jun 19, 2022"
  • 25
1 vote
1 answer
1k views

Datetime.strptime format for 2022-08-24T04:57:17.065000+00:00 [duplicate]

We have the following string in a variable: date_variable = "2022-08-24T04:57:17.065000+00:00" We would like to convert this to datetime. The following does not work: timestamp_formatted = ...
1 vote
3 answers
242 views

How to deserialize ISO8601 duration string to Duration and Period objects with Jackson

I have a string value containing ISO8601 duration string (P3Y6M4DT12H30M5S). How to deserialize it to Duration and Period object using Jackson ? I know that Duration accepts days, hours, minutes, ...
  • 147
0 votes
1 answer
203 views

Convert ISO 8601 string into TimeZone Info

My client app is sending me a date string using ISO 8601 format. I can get a DateTime using, DateTime.Parse(date, null, DateTimeStyles.RoundtripKind); How to create a .NET DateTime from ISO 8601 ...
0 votes
0 answers
1k views

Nest JS transform Iso8601String to Date in DTO with Error in Time

I'm trying parse ISo8601String to Date in Nest JS through DTO. I send a json with the date's string like: {lunMIni: 1001-01-01 00:00:00.000} In Nest js, I receive the data and it's transform by: @...
0 votes
0 answers
115 views

File naming and ISO 8601

I am creating an archive of pdf files (magazine issues) and currently in the process of determining the file naming convention I want to adopt. So far I have thought of Title_Title-YYYY-MM-DD-VVV-NNNN ...
  • 1
0 votes
1 answer
171 views

new Date(...).toISOString() in JavaScript gives incorrect result on one day of the year

I'm building a calendar and I noticed that the date is incorrect on one day of the year. I wanted to standardize dates to ISO 8601. Let's take 2022-03-27 for example: const foo = new Date(2022, 2, 27)....
0 votes
0 answers
21 views

datetime to ISO-8601 format [duplicate]

I have Django project and I want to use parse_datetime() to get (ISO-8601) formatted not in templates I have this datetime (2022-06-04 15:23:08.367007+00:00) I want it to be like this format (2022-06-...
0 votes
2 answers
96 views

Convert ISO 8061 datetime to timestamp in python

I have a string with a date in the format: 2021-03-12T14:45:34.000Z I would like to convert it to a standard format as this one: 12-Mar-2021 14:45:34 I tried using: print(datetime.datetime.strptime(&...
  • 438
0 votes
1 answer
453 views

How would I convert this string '2022-07-07T10:30:00-07:00' into datetime obj in python?

I am having trouble converting this string '2022-07-07T10:30:00-07:00' to a datetime object in order to then extract the date and time separately. I have tried the following code: date_time = '2022-...
1 vote
1 answer
2k views

How to convert a "yyyy-MM-dd'T'HH:mm:ssZ'" format in a dataframe to a datetime format

How can I convert a "yyyy-MM-dd'T'HH:mm:ssZ'" format in a dataframe to a datetime format that I can further format to an index 2021-01-02T05:22:58.000Z is one of the dates in the dataframe ...
  • 13
0 votes
0 answers
20 views

Specifying a date range in ISO8601 [duplicate]

In a string, ISO8601 dictates a date be represented YYYY-MM-DD. I have previously used YYYYMMDD, and in filenames have specified a date range as YYYYMMDD-YYYYMMDD. With the date including a hyphen now,...
0 votes
0 answers
155 views

Get timestamp iso 8601 in microseconds

I want to get current timestamp in ISO 8601 format with microseconds, like this format: 2021-12-15T16:06:24.400087Z I tried this but it did not work. Instant ins = Instant.now().truncatedTo(...

1
2 3 4 5
18