Python Forum
Given a date I need to separate data into weeks
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Given a date I need to separate data into weeks
#6
isocalendar() is datetime object's method. It appears your "values" is a string object.

The part in my example here
datetime.strptime(last_element, '%m/%d/%y %H:%M')/
converts the string to a datetime object in which can use isocalendar(). This is a very important step.
Recommended Tutorials:
Reply


Messages In This Thread
RE: Given a date I need to separate data into weeks - by metulburr - Sep-05-2017, 07:34 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Compare current date on calendar with date format file name Fioravanti 1 331 Mar-26-2024, 08:23 AM
Last Post: Pedroski55
  Python date format changes to date & time 1418 4 746 Jan-20-2024, 04:45 AM
Last Post: 1418
  importing functions from a separate python file in a separate directory Scordomaniac 3 1,438 May-17-2022, 07:49 AM
Last Post: Pedroski55
  Date format and past date check function Turtle 5 4,449 Oct-22-2021, 09:45 PM
Last Post: deanhystad
  How to add previous date infront of every unique customer id's invoice date ur_enegmatic 1 2,291 Feb-06-2021, 10:48 PM
Last Post: eddywinch82
  How to add date and years(integer) to get a date NG0824 4 2,958 Sep-03-2020, 02:25 PM
Last Post: NG0824
  Pulling & Reading Date from UDF that Compare it to Live Data firebird 4 2,848 Jul-20-2019, 09:30 AM
Last Post: snippsat
  Substracting today's date from a date in column of dates to get an integer value firebird 1 2,173 Jul-04-2019, 06:54 PM
Last Post: Axel_Erfurt
  How to change existing date to current date in a filename? shankar455 1 2,342 Apr-17-2019, 01:53 PM
Last Post: snippsat
  Date format conversion "/Date(158889600000)/" lbitten 2 2,892 Nov-29-2018, 02:14 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020