job-scrapper/lib/dateconverter.py

15 lines
295 B
Python
Raw Normal View History

2024-06-13 09:14:04 +00:00
def DateCHToUS(date):
#01.02.2010 --> 2010-02-01
day=""
month=""
year=""
for i in range(0,1+1):
day+= date[i]
for i in range(3,4+1):
month+=date[i]
for i in range(6,9+1):
year+=date[i];
newdate = year+"-"+month+"-"+day
return(newdate)