If I follow your question correctly, I think you're looking for the the 'datetime module' (which you've mentioned) but you also need to know the format string of the given date and how to use format strings generally. Once you know the format of the data you're dealing with, you can parse any date string and provided it's in the correct format, you can then turn it into a datetime object and do comparisons and other operations regardless of the original format of each date. Google the formats to pass to the datetime 'strftime' / 'strptime' methods to get the meanings of the '%' format specifiers; there are quite a few of them. Here's a very simple example using the two formats you've supplied:
#!/usr/bin/python
import datetime
import sys
import argparse
# Correctly fomatted command line args.
string_date1=sys.argv[1]
string_date2=sys.argv[2]
# Put the strings into datetime objects.
datetime_date1=datetime.datetime.strptime(string_date1,"%Y-%m-%dT%H:%M:%S.%fZ")
datetime_date2=datetime.datetime.strptime(string_date2,"%Y/%m/%d")
# Here are the dates packaged up into datetime objects.
print("Date 1: ",datetime_date1)
print("Date 2: ",datetime_date2)
# Compare
print ("Date 1 > date 2: ", datetime_date1 > datetime_date2);
print ("Date 2 > date 1: ", datetime_date2 > datetime_date1);
print ("Dates are equal? ", datetime_date1 == datetime_date2);
print ("Dates are not equal? ", datetime_date1 != datetime_date2);
Usage and output:
$ ./rudimentary_date_compare.py "2021-02-01T20:42:11.393Z" "2022/01/04"
Date 1: 2021-02-01 20:42:11.393000
Date 2: 2022-01-04 00:00:00
Date 1 > date 2: False
Date 2 > date 1: True
Dates are equal? False
Dates are not equal? True