I have a send_sms function, but the date format from the message is too long and detailed. I want it to format from 2021-01-24 05:12:21.517854+00:00
into just (5:12PM, 24Jan2021)
How can I do it? Thanks!
def send_sms(request):
z = Test.objects.latest('timestamp')
numbers = Mobile.objects.all()
message = (f'Test ({z.timestamp})')
class Test(models.Model):
timestamp = models.DateTimeField(auto_now_add=True)