User Tools

Site Tools


convert_string_to_date

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
convert_string_to_date [2022/11/28 04:50] rajuconvert_string_to_date [2022/11/28 05:00] (current) raju
Line 1: Line 1:
 +===== Convert string to date =====
 ==== single date string; without pandas; to datetime.date ==== ==== single date string; without pandas; to datetime.date ====
 Use <code> Use <code>
Line 25: Line 26:
 datetime.date datetime.date
 </code> </code>
 +
 +Ref:-
 +  * https://stackoverflow.com/questions/9504356/convert-string-into-date-type-on-python - where I found the answer
 +  * https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes - shows the list of all the format codes such as %B, %Y.
  
 ==== series of date strings; using pandas ==== ==== series of date strings; using pandas ====
Line 75: Line 80:
 dtype: object dtype: object
 </code> </code>
 +
 +See also: https://pandas.pydata.org/docs/reference/api/pandas.to_datetime.html
 +
convert_string_to_date.1669611010.txt.gz · Last modified: 2022/11/28 04:50 by raju