Joined: Sun Oct 26, 2008 9:47 am Posts: 2 Location: India
|
Hello champs,
I have a very basic question for you guys. I have a timestamp field in postgress database which is mapped to timestamp in java. In general i query the databse with date and time checks so its work all fine.
Now i have a specific requirement where database has to be queried for equality only on date part of database field (which is a timestamp) and should not consider time. I found that hibernate provides day() month() year() function to retrieve date from a database field but i dont want to make three comparision with each database record for date equality.
can you guys please suggest a good way of comparing only date part of a timestamp field ?
e.g.
Transmissiondate is a timestamp field in table. e.g 26-10-2007T11:33:55Z
i want to retrieve database fields only on the basis of date part ignoring time. e.g. 26-10-2007
Kindly advise. Hope i am able to explain problem precisely.
_________________ Regards
SKS
|
|