Skip to content
Advertisement

How to convert Linux date string to Python Datetime

I am trying to convert the Linux date time ‘Fri Feb 25 16:07:17 UTC 2022’ to python datetime but not able to achieve the same. However, I am able to do using below code, but still looking for the right approach:

Input -> Fri Feb 25 16:07:17 UTC 2022

JavaScript

Output -> ‘2022-02-25 16:07:17’

Advertisement

Answer

JavaScript

Output

2022-02-25 16:07:17

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement