macpie.datetimetools.reformat_datetime_str#

macpie.datetimetools.reformat_datetime_str(arg, format='%Y-%m-%d', **kwargs)#

Reformat a datetime string into specified format.

Parameters:
argstr

String to convert to a datetiime.

formatstr, default is %Y-%m-%d

Format string (passed to underlying datetime.date.strftime() to generate new formatted datetime string.

**kwargs

All keyword arguments are passed through to the underlying pandas.to_datetime() function.

Returns:
str

Reformatted datetime string