🤑 Join the Treehouse affiliate program and earn 25% recurring commission!

New No-Code Track! 🚀start learning today!

🌟 Dreaming of a bright future? 🎓 Ask about the Treehouse Scholarship program! 🚀

✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

  • Treehouse Logo
  • Plans
    Chevron
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
  • Library
    Chevron
    • All Courses
    • Tracks
    • College Credit
  • Techdegree
    Chevron
    • Overview
    • Front End Development
    • Full Stack JavaScript
    • Data Analysis
    • UX Design
    • Python
  • Community
    Chevron
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
  • Resources
    Chevron
    • Career Toolbox
    • CodeForward
    • Free Treehouse Near Me
    • Jobs
    • Blog
    • Support
    • About
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks College Credit
  • Overview Front End Web Development Full Stack JavaScript Python Development Data Analysis UX Design
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Career Toolbox CodeForward Free Treehouse Near Me Jobs Blog Support About
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • Android
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
  • Jorge Grajeda
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Jorge Grajeda
    Python Development Techdegree Graduate 8,186 Points

    dt.py task 3 of 4

    Posted February 14, 2023 7:22pm by Jorge Grajeda
    .a{fill-rule:evenodd;}techdegree seal-36
    Jorge Grajeda
    Python Development Techdegree Graduate 8,186 Points
    • Python
    • Dates and Times in Python (2014)
    • Dates and Times
    • now() and .replace()

    1 Answer

  • Tafadzwa Timothy Gakaka
    Tafadzwa Timothy Gakaka
    10,978 Points

    dates and time in python

    Posted December 16, 2020 5:40pm by Tafadzwa Timothy Gakaka
    Tafadzwa Timothy Gakaka
    10,978 Points
    • Python
    • Dates and Times in Python
    • Dates and Times
    • now() and .replace()

    3 Answers

  • Emily Strobl
    Emily Strobl
    5,429 Points

    im a little confused on how to use the replace method

    Posted September 9, 2019 4:45pm by Emily Strobl
    Emily Strobl
    5,429 Points
    • Python
    • Dates and Times in Python (2014)
    • Dates and Times
    • now() and .replace()

    2 Answers

  • Millie Jack
    Millie Jack
    278 Points

    agin help task 3

    Posted March 16, 2018 8:27pm by Millie Jack
    Millie Jack
    278 Points
    • Python
    • Dates and Times in Python
    • Dates and Times
    • now() and .replace()

    1 Answer

  • Millie Jack
    Millie Jack
    278 Points

    duunoo what to do

    Posted March 16, 2018 8:23pm by Millie Jack
    Millie Jack
    278 Points
    • Python
    • Dates and Times in Python
    • Dates and Times
    • now() and .replace()

    1 Answer

  • Bar Kamhine
    Bar Kamhine
    434 Points

    What is the problem?

    Posted October 17, 2017 12:45am by Bar Kamhine
    Bar Kamhine
    434 Points
    • Python
    • Dates and Times in Python
    • Dates and Times
    • now() and .replace()

    1 Answer

  • Chris van Beem
    PLUS
    Chris van Beem
    Courses Plus Student 26,647 Points

    import datetime now = datetime.datetime.now() two = now.replace(hours, 14) TASK 1 NO LONGER PASSING?

    Posted January 30, 2017 1:46pm by Chris van Beem
    Chris van Beem
    Courses Plus Student 26,647 Points
    • Python
    • Dates and Times in Python (2014)
    • Dates and Times
    • now() and .replace()

    1 Answer

  • FHATUWANI Dondry MUVHANGO
    FHATUWANI Dondry MUVHANGO
    17,796 Points

    help with datetime

    Posted November 10, 2016 7:59pm by FHATUWANI Dondry MUVHANGO
    FHATUWANI Dondry MUVHANGO
    17,796 Points
    • Python
    • Dates and Times in Python (2014)
    • Dates and Times
    • now() and .replace()

    2 Answers

  • gregory fenwick
    gregory fenwick
    7,569 Points

    AttributeError: type object 'datetime.datetime' has no attribute.

    Posted May 27, 2016 12:48am by gregory fenwick
    gregory fenwick
    7,569 Points
    • Python
    • Dates and Times in Python
    • Dates and Times
    • now() and .replace()

    1 Answer

  • MUZ140348 Sympathy Makururu
    MUZ140348 Sympathy Makururu
    10,209 Points

    Challenge Task 2 of 4 Create a variable named now that holds the results of datetime.datetime.now().

    Posted July 3, 2015 1:27pm by MUZ140348 Sympathy Makururu
    MUZ140348 Sympathy Makururu
    10,209 Points
    • Python
    • Dates and Times in Python
    • Dates and Times
    • now() and .replace()

    3 Answers

  • MUZ141065 Diana Shone
    MUZ141065 Diana Shone
    2,978 Points

    finally change two so its minute is 30

    Posted July 3, 2015 12:14pm by MUZ141065 Diana Shone
    MUZ141065 Diana Shone
    2,978 Points
    • Python
    • Dates and Times in Python
    • Dates and Times
    • now() and .replace()

    2 Answers

  • Liana Moleni
    Liana Moleni
    2,644 Points

    two's minute is 49, should be 30

    Posted May 25, 2015 11:51pm by Liana Moleni
    Liana Moleni
    2,644 Points
    • Python
    • Dates and Times in Python
    • Dates and Times
    • now() and .replace()

    1 Answer

  • Gordon Reeder
    Gordon Reeder
    2,521 Points

    Can't replace minute

    Posted April 8, 2015 10:08pm by Gordon Reeder
    Gordon Reeder
    2,521 Points
    • Python
    • Dates and Times in Python
    • Dates and Times
    • now() and .replace()

    1 Answer

  • MUZ140057 Dumisani Nyamusa
    MUZ140057 Dumisani Nyamusa
    8,029 Points

    date and times

    Posted January 22, 2015 1:19pm by MUZ140057 Dumisani Nyamusa
    MUZ140057 Dumisani Nyamusa
    8,029 Points
    • Python
    • Dates and Times in Python
    • Dates and Times
    • now() and .replace()

    3 Answers

  • Ben Thomas
    Ben Thomas
    1,911 Points

    Challenge Code Works Returns Correct Answer in IDLE Shell, But Not on Website

    Posted December 1, 2014 11:40pm by Ben Thomas
    Ben Thomas
    1,911 Points
    • Python
    • Dates and Times in Python
    • Dates and Times
    • now() and .replace()

    3 Answers

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

    Treehouse

  • About
  • Blog
  • Careers
  • Community
  • Stories
  • Shop
  • Contact
  • Gift Card

See Full Catalogue

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
  • Python Development
  • Data Analysis
  • UX Design

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
  • ...see more

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
  • ...see more

Explore

  • Plans
  • Affiliates
  • Perks
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
Terms & Conditions | Privacy

© 2025 Treehouse Island, Inc.