filter to schedule meetings using DateTime in Genexus

80 views Asked by At

I started programming a little while ago and started a project on genexus to schedule meetings for a company, which needs rules so as not to have appointments at the same times. I made the rules using date and they were working, but when I switched to datetime they don't work anymore. I dont know Genexus syntax for that, if anyone can help with this I would appreciate it.

do case
        case (LocacaoInicio <= &DTInicio and LocacaoFinal >= &DTInicio)
            or (LocacaoInicio <= &DTFinal and LocacaoFinal >= &DTFinal)
            &MensagemValidacao2 = 'Error'
            
        case (LocacaoInicio >= &DTInicio and LocacaoFinal <= &DTInicio)
            or (LocacaoInicio >= &DTInicio and LocacaoFinal <= &DTFinal)
            &MensagemValidacao2 = 'Error'
            
        case (LocacaoInicio < &DTFinal and LocacaoFinal < &DTFinal)
            or (LocacaoInicio > &DTInicio and LocacaoFinal > &DTInicio)
            &MensagemValidacao2 = 'ERROR'
            
        case (LocacaoInicio > &DTFinal and LocacaoFinal > &DTFinal)
            or (LocacaoInicio < &DTInicio and LocacaoFinal < &DTInicio)
            &MensagemValidacao2 = 'Error '
    endcase
translation of attributes and variables
locacaoinicio = InicialDate
locacaofinal = FinalDate
&mensagemvalidacao2 = &validationMassege
&DTFinal = &DateTimeFinal
&DTInicio = &DateTimeInicio
0

There are 0 answers