How would I convert
"2022-02-01" to something like
"2022-02-01T()" there are no brackets I'd like to convert each 30 minute interval from 2022-02-01 00:30:00 H:M:S and so forth.
I wanted to use something like
startDates = [{'start': {'date': '2022-02-01'}}] # Minimal Reproducible Example
timeZone = pytz.timezone('America/Vancouver')
for event in startDates:
newStartDateTime = datetime.strptime(event['start']['date'], '%Y-%m-%d' )
print(newStartDateTime)
datetime_ist = datetime.strptime(event['start']['date'], '%Y-%m-%d' ).replace(tzinfo=timeZone)
print("Date & Time in : ",datetime_ist.strftime('%Y-%m-%dT%H:%M:%S%z'))
Which does produce a time slot at the first H:M:S I'd to obtain 48 of these
2022-02-01 00:00:00
Date & Time in : 2022-02-01T00:00:00-0812