Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread FormatDateTime to filter EDBQuery
Tue, Jun 23 2015 8:39 AMPermanent Link

Beni

Hello,

I'm using EDBQuery in combination with the TcxGrid from DevExpress. This grid has the option to filter the displayed data and with this filter also filter the datasource of the grid. It's working well except for date fields. Good thing is that I can specify a DateTimeFormat which is going to be used by the grid to format the filter string using the FormatDateTime function but I can't find the correct format pattern to get the date in the format accepted by Elevate.
The short question would be: what format pattern should I provide for the ForamtDateTime function to get a "DATE 'yyyy-mm-dd" result?
Tue, Jun 23 2015 9:28 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Beni


You may well get an answer here (not from me because I don't use DevEx) but wouldn't you be better asking on their forums?

If they use the standard Delphi Format function you could try 'DATE YYYY-MM-DD'

Roy Lambert
Tue, Jun 23 2015 1:59 PMPermanent Link

Beni

Roy Lambert wrote:

>>If they use the standard Delphi Format function you could try 'DATE YYYY-MM-DD'

That would be easy! The problem is that the value must include single quotation mark: DATE 'yyyy-mm-dd'
Tue, Jun 23 2015 2:11 PMPermanent Link

Beni

Let's forget DevExpress for the moment. I could translate my initial post into this question:
What date pattern should I add into a FormatDateTime function in order to get a string in the elevate date formate (DATE 'yyyy-mm-dd')
Tue, Jun 23 2015 2:16 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Beni


I assume that whatever version of Delphi you're running will code with

showmessage(FormatDateTime('"DATE" "''"YYYY-MM-DD"''"',Now));

no idea about DevEx

Roy Lambert
Image