How to compare data values in Groovy : I need to compare two data in  format `13.07.2017 14:03:51,469000000` using groovy

I try to do this, but get error message. Which type of value should I choose for date for compare it?

    time1  = time1['TIME'] as String
    assert time1 > time2, 'Error'