Announcement

Collapse
No announcement yet.

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

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • [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

  • #2
    Try

    == "null"

    Kevin

    Comment


    • #3
      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
      Last edited by javi476pr; 03-12-2013, 11:55 AM.

      Comment


      • #4
        Thank you Kevin, it worked!

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

        Comment

        Working...
        X