def METHOD_NAME(self, value: str, coltype: TemporalType) -> str:
    if coltype.rounds:
        return self.to_string(f"cast( cast({value} as datetime({coltype.precision})) as datetime(6))")
    s = self.to_string(f"cast({value} as datetime(6))")
    return f"RPAD(RPAD({s}, {TIMESTAMP_PRECISION_POS+coltype.precision}, '.'), {TIMESTAMP_PRECISION_POS+6}, '0')"