I have a problem while selecting the records between the given hijri dates.
In the table I have maintain the hijri date as a string field and storing values as well.
Now requirement is to select the records between the given hijri dates. How could I do that.
Following is the example query:
SELECT * FROM
WHERE ((ExpiryDateHijiri>=‘18/01/1441’ AND ExpiryDateHijiri<=‘16/02/1441’))
need to write the XPP query also.
Can you be more precise: do you need the SQL X++ query or using a query object,?
where your code is located? form datasource, class etc?
I have written the query only in the button click event of the form.
After selecting ‘from date hijri’ and ‘to date hijri’ I need to filter records based on the condition.
I require only the X++ format query only.
Storing dates as strings doesn’t sound like a good idea to me. Problems with sorting and filtering are completely expected.
I would still use date fields to store dates in database and simply convert hijri dates to gregorian dates before running the query. CalendarConverter class will help you with that.