[Solved] Question about isAfter

I am trying to use isAfter but need some help

val DateTimeType datetime_weatherwarningvalidfrom = DateTimeType.valueOf(string_dwdweatherwarning_onset.state.toString()) 
        val DateTimeType datetime_weatherwarningvalidto = DateTimeType.valueOf(string_dwdweatherwarning_expires.state.toString()) 
        val DateTimeType datetime_now = new DateTimeType(now.toString)

        if (datetime_now.isAfter(datetime_weatherwarningvalidfrom)) 
        (

        )

string_dwdweatherwarning_onset = 2020-03-22T06:00+01:00

error is

'isAfter' is not a member of 'org.eclipse.smarthome.core.library.types.DateTimeType'; 

how can I determine is after coorectly??

Just a quick guess:

if (datetime_now.isAfter(datetime_weatherwarningvalidfrom.state as DateTimeType)) 

@H102 same error

'isAfter' is not a member of 'org.eclipse.smarthome.core.library.types.DateTimeType';

solved with
(now.isAfter((datetime_weatherwarningvalidfrom.zonedDateTime.toInstant.toEpochMilli))