Null date value logic in PQ

Hi all,

I am trying to do a logic (if statement) within PQ on date columns that have null values. I first replaced the null values with 3/9/1974. I then tried to do an if then else statement and get an error message. Can someone help me? I tried to look online and in forum and can’t seem to find a solution.

Thanks in advance

image

image

Hi @ysherriff,

You’re not sharing the error message itself but I can take a guess at the problem…
blablabla = 3/19/1974

Assuming you’re comparing date not datetime values, should read:
blablabla = #date(1974, 3, 19)

Give it a go, I hope this is helpful

1 Like

Works like a charm Melissa and apologize for such an easy request for you. :smile:

On another note, where can I get date syntax for PQ? Do you have a reference list?

Thanks

Sure, try the online language specification, here’s a link to the chapter on date functions

1 Like

Thank you Melissa like always.