[SOLVED] I want to know if a date field is null or empty

Hello to everyone, please I need to know is a date field is null

I’ve tried with dateField==null, dateField==’’ and always appears like there is a value, bue the field is empty

if ( {proFechaPrescripcion}=="")
{
sc_ajax_message(‘Es nula’, $javascript_title);
}
else
{
sc_ajax_message(‘No es nula’, $javascript_title); <-- I got everytime that
}

Can you help me??

Thanks and I’m sorry by my poor english :frowning:

Try

== “null”

Kevin

Saludos Julio!

Verifica que no tenga un valor default en la base de datos.

Intenta con:

if ( {proFechaPrescripcion}==False)

Tambi?n puedes intentar con:

empty({proFechaPrescripcion})

Elmer

Thank you Kevin, it worked!

Gracias Elmer, voy a probar con lo que indicaste, de todas maneras funcion? de la manera que indic? Kevin.

use php empty() function for select ;
Example:
empty({field})

for date field
if({user_group_unit_finish_at}==“null”)

1 Like