In Python I have this code:
now = datetime.now().isoformat()
if "." not in now:
now = now + ".000000"
Can I achieve the same result in Javascript?
The resulting datetime should match this mask %Y-%m-%dT%H:%M:%S.%f because the datetime will be saved into the database and then I need to retrieve it from Python code with exactly this mask.
if "." not in nowcheck? Is there some scenario where the iso format doesn't return.?.somethingpart was missing often. Maybe I could omit it now (I'm not sure).