Answer the question
In order to leave comments, you need to log in
How to display the date in the format 11/01/1991 from the database?
I need to display the date from the database in the format 08.12.2021
When outputting, I get [('2021-12-07 15:50:24.069053',)]
How can I do this?
def get_reg_date(self, user_id):
with self.connection:
return self.cursor.execute("SELECT `date_registration` FROM `users` WHERE `user_id` = ?", (user_id,)).fetchall()
Answer the question
In order to leave comments, you need to log in
SELECT strftime('%d.%m.%Y', `date_registration`) AS `date_registration` FROM `users` WHERE `user_id` = ?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question