You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by siva <si...@bizruntime.com> on 2019/06/23 15:17:46 UTC

Sql Query Based On DateTime in .Net

Hi 

I am running .net core app as a server and using .net thin-client for crud
operations and SQL query . Here is the problem i am facing.

*Model Class:*




Here Getter and Setter using for to Convert DateTime to Utc DateTime .

If I  Use 
Cache.Get("1")  able to get the JoinDate (i.e. DateTime Field) in Object
Which I have store in Cache 
 But if I Use Sql Query Not able to get value.I have Looked at SqlLine
,JoinDate Field Comming as Empty in Result 

*Using cache.Get() result*
<http://apache-ignite-users.70518.x6.nabble.com/file/t1379/picturemessage_apmhker5.png> 


*Using sql Query Result*

<http://apache-ignite-users.70518.x6.nabble.com/file/t1379/picturemessage_btry3pys.png> 


*In SQl Line Query Result*
<http://apache-ignite-users.70518.x6.nabble.com/file/t1379/picturemessage_0dud44xi.png> 



Thanks





















--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Sql Query Based On DateTime in .Net

Posted by Alexandr Shapkin <le...@gmail.com>.
Hi, 

I would suggest you to move your business logic out of queryable fields.
Put [QuerySqlField] to plain _JoinDate and rewrite your sql to "where
_JoinDate = ..."

This should work as your *cache.Get() result* example.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/