Example 1: Python program to print the current date and time
kw.py
Output
kodingwindow@kw:~$ python3 kw.py
________________________________________
Program to print the current date and time
________________________________________
Date And Time | 2019-04-29 00:01:28.561583
ISO Format | 2019-04-29T00:01:28.561583
Year | 2019
Month | 4
Day | 29
DD/MM/YYYY | 29/4/2019
Hour | 0
Minute | 1
Second | 28
Microsecond | 561583
HH:MM:SS | 0:1:28
________________________________________
Example 2: Python program to print the current date and time
kw.py
Output
kodingwindow@kw:~$ python3 kw.py
________________________________________
Program to print the current date and time
________________________________________
Time 24Hr | 00:02:25
Time 12Hr | 12:02:25
DD/MM/YYYY | 29/04/2019
MM/DD/YYYY | 04/29/19
Date And Time | Mon Apr 29 00:02:25 2019
HH:MM:SS | 00:02:25
Weekday | Mon
Weekday | Monday
Month | Apr
Month | April
Day of Month | 29
Hour 24Hr | 00
Hour 12Hr | 12
Day of Year | 119
Month | 04
Minute | 02
AM ? PM | AM
Week Number | 17
Weekday | 1
Week Number | 17
Year Century | 2019
Time Zone | IST
________________________________________
Example 3: Python program to print the current date and time
kw.py
Output
kodingwindow@kw:~$ python3 kw.py
________________________________________
Program to print the current date and time
________________________________________
Local Time | Mon Apr 29 00:03:29 2019
Local Time | Mon Apr 29 00:03:29 2019
Local Time | Mon Apr 29 00:03:29 2019
DST Timezone | -19800
Local Time | time.struct_time(tm_year=2019, tm_mon=4, tm_mday=29, tm_hour=0, tm_min=3, tm_sec=29, tm_wday=0, tm_yday=119, tm_isdst=0)
Local Time | time.struct_time(tm_year=2019, tm_mon=4, tm_mday=28, tm_hour=18, tm_min=33, tm_sec=29, tm_wday=6, tm_yday=118, tm_isdst=0)
Local Time | time.struct_time(tm_year=2019, tm_mon=4, tm_mday=29, tm_hour=0, tm_min=3, tm_sec=29, tm_wday=0, tm_yday=119, tm_isdst=0)
________________________________________
Dear User, Thank you for visitng Kodingwindow. If you are interested in technical articles, latest technologies, and our journey further, please follow us on LinkedIn.
Dear User, We are grateful for your interest in the Kodingwindow Android app. We intend to soon make it available on the Google Play Store. Currently, Android versions 10 and up require manual apk installations. Would you like to get the app?