Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Date format and past date check function
Post: RE: Date format and past date check function

(Oct-21-2021, 10:41 PM)deanhystad Wrote: from datetime import datetime def enter_date(): '''Enter date string. Return reformatted datestring and flag indicating if date is in the past''' w...
Turtle General Coding Help 5 4,260 Oct-22-2021, 12:59 AM
    Thread: Date format and past date check function
Post: Date format and past date check function

I'm looking to combine my logic into a single function to check if the user's input is in my required format and to make sure the date is not in the past. Every time I think about it, it seems like I...
Turtle General Coding Help 5 4,260 Oct-21-2021, 07:05 PM
    Thread: Get last row of SQL database and update
Post: RE: Get last row of SQL database and update

@buran - Thanks for the reply. Apologies for leaving out the library I was using. I'll be sure to include that in the future as in this case, it was an important factor into the issue. The issue I ...
Turtle General Coding Help 5 3,151 Oct-14-2021, 07:06 PM
    Thread: Get last row of SQL database and update
Post: RE: Get last row of SQL database and update

Thanks for the replies. Below is what I've come up with now however I'm getting an error. cursor = db.execute( "SELECT * FROM meetingData ORDER BY meeting_id DESC LIMIT 1;") meeting...
Turtle General Coding Help 5 3,151 Oct-14-2021, 12:41 PM
    Thread: Get last row of SQL database and update
Post: Get last row of SQL database and update

First time working with a SQL database... I have the following database: +------------+-------------------+--------------+--------------+-----------------+--------------+------------+ | meeting_id |...
Turtle General Coding Help 5 3,151 Oct-14-2021, 12:17 AM
    Thread: Exit function from nested function based on user input
Post: RE: Exit function from nested function based on us...

Thanks, buran. This was a helpful response and a great way to accomplish my goal. I've incorporated your first example for now and will see how it works with my Discordpy bot.
Turtle General Coding Help 5 2,906 Oct-10-2021, 12:55 AM
    Thread: Exit function from nested function based on user input
Post: RE: Exit function from nested function based on us...

(Oct-05-2021, 08:12 PM)jefsummers Wrote: def foo(): def check(m): if m == "stop": return 'exit' msg = input("Type a msg: ") if check(msg) == 'exit': return...
Turtle General Coding Help 5 2,906 Oct-05-2021, 11:37 PM
    Thread: Exit function from nested function based on user input
Post: Exit function from nested function based on user i...

Hello, Currently making a chat bot that helps with adding some items to a database. I want a user to be able to start adding something to a database but be able to cancel at anytime. Here's my curr...
Turtle General Coding Help 5 2,906 Oct-05-2021, 08:02 PM

User Panel Messages

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