ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Meindert" <meind...@pastelebusiness.com>
Subject RE: How to use system date
Date Wed, 27 Jun 2007 08:41:24 GMT
As far as I know, not with iBatis,

 

1)       Pass the current System Date as parameter from your Java code

2)       Use the native function call for your Database

 

MySql= Now()

Derby= CURRENT_TIMESTAMP

SqlServer= getDate()

 

>'Select * from test where data = sysdate'

This will get you the current system timestamp (current date/time in
milliseconds) and your query won't return any rows

 

 

  _____  

From: bharathi.mani@accenture.com [mailto:bharathi.mani@accenture.com] 
Sent: 27 June 2007 10:33 AM
To: user-java@ibatis.apache.org
Subject: How to use system date

 

Hi,

 

How can I pass current system date to a select query in iBatis? 

'Select * from test where data = sysdate'. Will this work?

 

Thanks,

Bharathi

This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information. If you have
received it in error, please notify the sender immediately and delete the
original. Any other use of the email by you is prohibited.


Mime
View raw message