Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created Aug 30, 2020
Embed
What would you like to do?
# Import all the code from myfunc.py as my.
import myfunc as my
# Need dates in this code
from datetime import datetime as dt
# Some simple test data.
string_date="12/31/2019"
# Convert string date to datetime.date
print(my.to_date(string_date))
today = dt.today()
# Show today's date in mm/dd/yyyy format.
print(my.mdy(today))
dollar_amt=12345.678
# Show this big number in currency format.
print(my.to_curr(dollar_amt))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment