db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ulrich Voigt <u.vo...@gematronik.com>
Subject Re: Using datetime math with derby
Date Wed, 12 Jan 2005 08:40:24 GMT
Hi Dan,

I am sorry. I should have opened my eyes before start reading ;-) So I 
read over that you provided a different function than Rajesh did.
Thanx for your help!

Ulrich

Daniel John Debrunner schrieb:

>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>Ulrich Voigt wrote:
>
>  
>
>>Hi,
>>
>>thanks for your answers. Rajesh answer hit the point.
>>Dan, the link you gave didn't show a way, how to convert a TIMESTAMP to
>>BIGINT.
>>    
>>
>
>No the link didn't, but my example SQL function with Java method did.
>See below. The link was to help understand what the value of the BIGINT
>returned by this function means.
>
>Dan.
>
>
>  
>
>>SQL
>>
>>create function toTS(TS TIMESTAMP) returns BIGINT
>>PARAMETER STYLE JAVA NO SQL LANGUAGE JAVA
>>EXTERNAL NAME 'TestTS.getSimpleTime'
>>
>>Java
>>
>>public static long getSimpleTime(java.sql.Timestamp ts) {
>>       return ts.getTime();
>>  }
>>    
>>
>
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1.2.5 (MingW32)
>Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
>iD8DBQFB5C8dIv0S4qsbfuQRAsDcAKCLxbhJoYQyIQOT0xhYMd3qtMLsiwCg5W+z
>S0mQjK+EvAjkWkNQyAcksjk=
>=dcKN
>-----END PGP SIGNATURE-----
>
>
>  
>


Mime
View raw message