db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <rick.hille...@oracle.com>
Subject Re: Date/Time Formatting
Date Tue, 08 Nov 2011 16:20:17 GMT
Hi Pavel,

I don't see a builtin function which does what you want. You might be 
able to cobble together what you need using the LOCATE and SUBSTR 
functions, but the statement would probably look ugly. Alternatively, 
you can register your own user defined formatting function using the 

Hope this helps,

On 11/8/11 7:32 AM, Pavel Bortnovskiy wrote:
> Hello:
> Are there Derby built-in functions which can allow me to extract 
> current date/time as integers as:
> Time HHmmss: 103152
> Date yyyyMMdd:  20111108
> I could get as far as:
> *cast*(*current_time as **VARCHAR*(8)),
> *cast*(*current_date as **VARCHAR*(10)),
> but I was unable to find a function similar to str_replace in Sybase 
> to remove “:” and “-“
> Thank you,
> Pavel.
> Jefferies archives and monitors outgoing and incoming e-mail. The 
> contents of this email, including any attachments, are confidential to 
> the ordinary user of the email address to which it was addressed. If 
> you are not the addressee of this email you may not copy, forward, 
> disclose or otherwise use it or any part of it in any form whatsoever. 
> This email may be produced at the request of regulators or in 
> connection with civil litigation. Jefferies accepts no liability for 
> any errors or omissions arising as a result of transmission. Use by 
> other than intended recipients is prohibited. In the United Kingdom, 
> Jefferies operates as Jefferies International Limited; registered in 
> England: no. 1978621; registered office: Vintners Place, 68 Upper 
> Thames Street, London EC4V 3BJ. Jefferies International Limited is 
> authorised and regulated by the Financial Services Authority.

View raw message