Uso de un campo derivado para colocar la hora en formato de 24 horas

Problema o error: ¿Cómo coloco la hora en formato de 24 horas (horario militar) en Campaign?

Solución: Para tener el formato de 24 horas puede crear un campo derivado en Campaign utilizando la siguiente instrucción.

if((string_seg(10, 11, Current_Time()) = 'PM' AND number(string_seg(1, 2, Current_Time()))< 12) , string_concat(format((number(string_seg(1, 2, Current_Time()))+ 12),2), string_seg(3, 8, Current_Time())), if ((string_seg(10, 11, Current_Time()) = 'AM' AND number(string_seg(1, 2, Current_Time())) = 12), string_concat('00', string_seg(3, 8, Current_Time())), string_concat(string_seg(1, 2, Current_Time()), string_seg(3, 8, Current_Time()))))
*

Éste es un método alternativo que logra el mismo resultado.

StripHour = string_seg(1, 2, Current_time()) HourNum = number(StripHour) StripPM = string_seg(10, 11, Current_time()) StripRest = string_seg(3, 8, Current_time()) if((StripPM = 'PM' AND HourNum < 12), string_concat(format((HourNum + 12),2), StripRest), if ((StripPM = 'AM' AND HourNum = 12), string_concat('00', StripRest), string_concat(Strip_Hour, StripRest)


Unica Campaign
 
8.5.0
For more information, see our support and community site: Customer Central