Differences between revisions 6 and 8 (spanning 2 versions)
Revision 6 as of 2018-10-28 11:12:24
Size: 2537
Comment:
Revision 8 as of 2019-10-09 15:00:32
Size: 2537
Comment:
No differences found!

[ edit ]

import datetime

def today():
    return( datetime.date.today() )

import datetime

def now():
    return( datetime.datetime.now() )

import datetime

def today_str():
    date_of_today = today()
    return( str( date_of_today.year  ) + "" + 
            str( date_of_today.month ) + "" +
            str( date_of_today.day   ) + "" )

import datetime

def now_str():
    current_time = now()
    return( str( current_time.hour   ) + "" + 
            str( current_time.minute ) + "" + 
            str( current_time.second ) + "" + 
            str( current_time.microsecond ) + "μ秒" )

SoftEng: Python/Prog/Example/02/Ex_005a/Digest (last edited 2019-10-09 15:00:32 by TadashiIijima)