Python Parse String to Date

Descripción

Parse string to date using common formats


File Template: ❌


Prefix

date:parse


Scopes

python


Snippet de código

from datetime import datetime

${1:date_var} = datetime.strptime(${2:date_string}, "${3|%Y-%m-%d,%d/%m/%Y,%m/%d/%Y,%d-%m-%Y,%Y/%m/%d|}").date()