Answer the question
In order to leave comments, you need to log in
[telegram-bot-aiogram] Getting today's date using from datetime?
[telegram-bot-aiogram] Getting today's date using from datetime?
Good day. I am writing a telegram bot based on aiogram.
I'm trying to get the date with:
from datetime import datetime
newdate = datetime.now()
newdate = newdate.strftime("%d.%m.%Y")
elif message.text == 'Сегодняшняя дата':
global msg_1
msg_1 = await bot.send_message(message.chat.id,text = '<i>✅<code>{NowDate}</code></i>',reply_markup = kb.cancel)
await form.date.set()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question