Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.basic.visual.misc > #2232

Re: How To insert Date From VB6.0 to Oracle #2

From Deanna Earley <dee@earlsoft.co.uk>
Newsgroups comp.lang.basic.visual.misc
Subject Re: How To insert Date From VB6.0 to Oracle #2
Date 2015-01-20 09:22 +0000
Organization Aioe.org NNTP Server
Message-ID <m9l6s3$aed$1@speranza.aioe.org> (permalink)
References <1115223540.528401.47840@o13g2000cwo.googlegroups.com> <oPudnaIWF7aX1CDJnZ2dnUU7-VWdnZ2d@giganews.com>

Show all headers | View raw


On 19/01/2015 18:12, tonisukmana wrote:
> how to format the date plus hours minutes seconds ? I got the error
> vardate = Format ( ADate , "dd-mmm-yyyy hh:mm:ss" )
>
> db.Execute("Insert into FZTempTbl(EntryDate) Values(" & _
> "TO_DATE('" & vardate  & "')

It must be in a specific format:
http://docs.oracle.com/cd/B19306_01/server.102/b14200/sql_elements003.htm#BABGIGCJ
(First result for "oracle sql date literal")

db.Execute "Insert into FZTempTbl(EntryDate) Values(TIMESTAMP '" & 
Format(vardate, "yyyy-mm-dd hh:mm:ss") & "')"

-- 
Deanna Earley (dee@earlsoft.co.uk, dee@doesnotcompute.co.uk)

(Replies direct to my email address will be printed, shredded then fed 
to the rats. Please reply to the group.)

Back to comp.lang.basic.visual.misc | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: How To insert Date From VB6.0 to Oracle #2 tonisukmana <tonie_id@yahoo.com> - 2015-01-19 12:12 -0600
  Re: How To insert Date From VB6.0 to Oracle #2 GS <gs@somewhere.net> - 2015-01-19 16:31 -0500
  Re: How To insert Date From VB6.0 to Oracle #2 Deanna Earley <dee@earlsoft.co.uk> - 2015-01-20 09:22 +0000

csiph-web