strptime Questions

4

Solved

I have a timestamp string that looks like this: 2019-02-16T10:41:20.6080000+01:00 I have to parse it to datetime. Because there are 7 instead of 6 digits for microseconds the following format do...
Readytowear asked 9/4, 2019 at 6:24

5

Solved

I have a datetime that is a string I read from a text file. I want to trim the extra milliseconds off of it, but I want to convert it to a datetime variable first. This is because it may be in diff...
Steiger asked 23/3, 2015 at 17:11

3

Solved

How do I use strptime or any other functions to parse time stamps with milliseconds in R? time <- "2010-01-15 13:55:23.975" print(time) # [1] "2010-01-15 13:55:23.975" strpti...
Fineman asked 27/1, 2010 at 20:48

3

Solved

I am trying to decode a date string to epoch but I have difficulties getting the timezone. This is the last modified date from Amazon S3 keys. time.strptime(key.last_modified, '%Y-%m-%dT%H:%M:%S.%...
Celestinacelestine asked 20/10, 2013 at 1:8

8

Solved

I have some very simple data in R that needs to have its date format changed: date midpoint 1 31/08/2011 0.8378 2 31/07/2011 0.8457 3 30/06/2011 0.8147 4 31/05/2011 0.7970 5 30/04/2011 0.7877 6 3...
Balzer asked 16/9, 2011 at 3:56

6

Solved

I have some log files with times in the format HH:MM::SS.nano_seconds (e.g. 01:02:03.123456789). I would like to create a datetime in python so I can neatly do math on the time (e.g. take time diff...
Teaspoon asked 16/5, 2012 at 2:40

5

Solved

I am creating a module in python, in which I am receiving the date in integer format like 20120213, which signifies the 13th of Feb, 2012. Now, I want to convert this integer formatted date into a ...
Rexanna asked 17/3, 2012 at 13:26

2

Solved

Typing man strptime it sais that this function needs to have declared _XOPEN_SOURCE and included time.h header. I did it. But, when I try to compile my code I get: ./check.c:56: warning: implici...
After asked 11/3, 2013 at 9:1

8

Solved

Please consider the following $ R --vanilla > as.Date("01 Jan 2000") Error in charToDate(x) : character string is not in a standard unambiguous format But that date clearly is in a standard...
Porphyritic asked 7/2, 2013 at 15:58

9

Solved

I have a String which I parse with DateTime.strptime. The Timezone of the Date in the String is CET but Ruby creates an UTC DateTime object which of course has an offset of 2hrs. Currently I'm wor...
Wideman asked 26/10, 2011 at 21:26

8

Solved

Please what's wrong with my code: import datetime d = "2013-W26" r = datetime.datetime.strptime(d, "%Y-W%W") print(r) Display "2013-01-01 00:00:00", Thanks.
Witter asked 13/6, 2013 at 12:39

10

Solved

I have a date string with the format 'Mon Feb 15 2010'. I want to change the format to '15/02/2010'. How can I do this?
Hunkers asked 15/2, 2010 at 10:49

5

Solved

I have a problem with the following code. I get an error "strptime() argument 1 must be str, not Timestamp" I guess that what I should do is to convert date from timestamp to string but I do not k...
Abrogate asked 1/5, 2019 at 19:26

6

Solved

I am trying to the parse dates of the format '2016-04-15T12:24:20.707Z' in Python, tried strptime, doesn't work and I also tried django parse_datetime but it only returns none as the value
Rumania asked 14/8, 2018 at 8:53

8

Solved

I have a date string and want to convert it to the date type: I have tried to use datetime.datetime.strptime with the format that I want but it is returning the time with the conversion. when = all...
Thursby asked 2/10, 2014 at 2:47

3

Solved

I have code which reads vast numbers of dates in 'YYYY-MM-DD' format. Parsing all these dates, so that it can add one, two, or three days then write back in the same format is slowing things down q...
Bow asked 20/11, 2012 at 7:5

5

Solved

I have three date formats: YYYY-MM-DD, DD.MM.YYYY, DD/MM/YYYY. Is it possible to validate and parse strings such as 2014-05-18 or 18.5.2014 or 18/05/2019?
Stanwinn asked 10/5, 2014 at 12:35

5

Solved

I have the following datetime string s: 2017-10-18T04:46:53.553472514Z I parse it like that: t = datetime.strptime(s, '%Y-%m-%dT%H:%M:%SZ') how to fix ValueError: time data '2017-10-18T04:46:53.55...
Rotman asked 24/10, 2017 at 9:9

2

Solved

Actual question How can I temporarily change/specify the locale settings to be used for certain function calls (e.g. strptime())? Background I just ran the following rvest demo: demo("tripadvi...
Pupil asked 10/12, 2014 at 10:38

4

Solved

Is there a way to parse timezone in "+00:00" format with datetime.strptime? For instance: Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 bit (In tel)] on win32 Type "help...
Wreath asked 23/6, 2015 at 9:40

3

Solved

Due to my application's circumstances, I would prefer to use datetime.strptime instead of dateutil.parser. After looking at the docs, I thought that %Y-%m-%dT%H:%M:%S%z may be the proper format fo...
Brindled asked 29/5, 2019 at 12:40

6

Solved

Want to change the class for Time to POSIXlt and extract only the hours minutes and seconds str(df3$Time) chr [1:2075259] "17:24:00" "17:25:00" "17:26:00" "17:27:00" ... Used the strptime functi...
Korrie asked 7/8, 2015 at 11:45

0

Disclaimer: The title of the question might be wrong, because I don't know what causes this behaviour. The 'issue' is that viewing a POSIXlt object in RStudio viewer shows an infinite linked list, ...
Zach asked 8/3, 2021 at 11:16

1

I am totally new into programming, and I am giving a stab to python reading CSV files with Pythin. I am doing this using Spyder. I am getting a the error "module 'datetime' has no attribute 'strpti...
Brooklyn asked 23/2, 2019 at 14:57

5

Solved

Where can I find a list of all legal time names for R function as.POSIXct? as.POSIXct("1970-01-01",tz="CST") generates a warning that "CST" (Central Standard Time) is unknown.
Anachronistic asked 28/10, 2010 at 21:9

© 2022 - 2025 — McMap. All rights reserved.