Sysntaxis Error on Expression Date_diff and Time_diff

Oktii
Oktii New Altair Community Member
edited November 2024 in Community Q&A
date_diff(`M1 Inicio`, `M1 Final`, DATE_UNIT_HOUR, "America/Mexico_City")
Tagged:

Best Answer

  • BalazsBaranyRM
    BalazsBaranyRM New Altair Community Member
    Answer ✓
    Hi!

    You need to call date_diff like this:

    date_diff([M1 Inicio], [M1 Final], ...)

    The attribute names can't be quoted with the single quotes you're using, only with [].

    You can click attribute names in the list on the right side, they will be inserted correctly by Generate Attributes.

    Regards,
    Balázs

Answers

  • Oktii
    Oktii New Altair Community Member
    I tray differnt formats a on this expession without sucess

  • BalazsBaranyRM
    BalazsBaranyRM New Altair Community Member
    Answer ✓
    Hi!

    You need to call date_diff like this:

    date_diff([M1 Inicio], [M1 Final], ...)

    The attribute names can't be quoted with the single quotes you're using, only with [].

    You can click attribute names in the list on the right side, they will be inserted correctly by Generate Attributes.

    Regards,
    Balázs
  • Oktii
    Oktii New Altair Community Member
    thanks