Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have the following:
LOAD
BusinessDate,
AccountCode,
TT2,
Nominal,
StartDate,
EndDate
FROM
$(qvdPath)$(ReportQVD).qvd (qvd)
WHERE wildmatch(AccountCode,'test0?','novat?','novt??') = 0
and num(date#(BusinessDate,'YYYYMMDD')) >= num(Date#($(vCutOffDate),'YYYYMMDD'))
How can I know that a field is really a date field so I don't need to convert to a number. What's the best way to compare 2 date fields if having suspicions that one is a string with a date stored inside. Any comments how to compare 2 fields which could be strings so the date comparison could be totally wrong? I am also worried that expressions like the above can cause performance issues so need the most efficient way if any?
Thanks.
If the date has been interpreted correctly, it will be right-aligned in a list box. Then it will be a number, and the Num() function is not necessary.
See
HIC
Hi,
See Alt() in help menu might be helpful to you.
Regards
There are a lot of questions in your post, which makes it difficult to provide a clear answer...
The more your field values prove to be inconsistent, the higher the price you'll pay for handling all different cases in QV script. If you can be sure that all values are formatted exactly the same, you can safely rely on date#() on condition that you specify a correct format string.
For every call to date# that is offered a correctly formatted date, the numerical value will be part of the output.
For every call to date# that is offered an incorrectly formatted date, the numerical value will be missing in the output. In theory, IsNum(date#(...)) should now return false().