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

🤑 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

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

  • 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
    • Showing results for:
    • Python
    • Dates and Times in Python (2014)
    • Dates and Times
    • now() and .replace()
    • Close
  • 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 on Feb 14, 2023 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 on Dec 16, 2020 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 on Sep 9, 2019 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 on Mar 16, 2018 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 on Mar 16, 2018 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 on Oct 17, 2017 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 on Jan 30, 2017 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 on Nov 10, 2016 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 on May 27, 2016 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 on Jul 3, 2015 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 on Jul 3, 2015 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 on May 25, 2015 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 on Apr 8, 2015 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 on Jan 22, 2015 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 on Dec 1, 2014 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.