Originally we thought SYSDATE in Oracle Forms meant the database
server's date.
At least it seemed that way in Forms 4.5. In Forms 5.0, SYSDATE
definitely gives
us the PC's operating system date while we wanted the database one.
We have a lot of forms that have WHEN-NEW-RECORD-INSTANCE or
PRE-INSERT triggers that all assign some date field with SYSDATE.
We tried changing SYSDATE to $$DBDATE$$, but that only works as
the Initial Value in the field's property palette.
Syntatically, you can't do this, for example:
:block_name.last_update_date := $$DBDATE$$;
So how can we write something that has the same meaning as above,
without actually using $$DBDATE$$? Is there another built-in function
or pseduo-column that means the same thing?
You might say, simply don't assign anything and fill in all the
Initial Values with $$DBDATE$$. But what if you need to do the
assignment on a conditional basis?
Thanks in advance for any suggestions.
===================
Eugene Fan
CEXEC / IMCEN
fa...@hqda.army.mil
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
Simon Hedges
Gloucester
UK
eug...@tidalwave.net wrote in message <7habrc$p5e$1...@nnrp1.deja.com>...
select trunc(sysdate) into my_date_field from dual;
cheers, sue
Simon Hedges <she...@hhhh.freeserve.co.uk> wrote in article
<7had02$9r3$1...@news4.svr.pol.co.uk>...
> You could try creating a database function (e.g. fn_dbdate)
> that returns a date parameter.
> This would be executing the 'sysdate' command actually on the database
> and returning the result to the form, so no actual forms processing
> would be used the calculate the data. In theory, this should work.
>
> eug...@tidalwave.net wrote in message <7habrc$p5e$1...@nnrp1.deja.com>...
> >
I don't know in Forms 5.0, but in Forms 6.0,
:block.item := sysdate;
affects the date of the server - as expected.
--
Th. Thomas, ICQ : 8823153
AAD en cours pour la création d'un forum francophone sur les S.G.B.D.
-> RDV sur fr.usenet.forums.evolution
Simplest way : create dummy item (DISPLAY=FALSE) default value $$DBTIME$$.
When you need time just take it from this item.
eug...@tidalwave.net wrote in message <7habrc$p5e$1...@nnrp1.deja.com>...
>Hello Gurus,
>
>Originally we thought SYSDATE in Oracle Forms meant the database
>server's date.
>At least it seemed that way in Forms 4.5. In Forms 5.0, SYSDATE
>definitely gives
>us the PC's operating system date while we wanted the database one.
>
--
Paul Dorsey
Dulcian, Inc.
www.dulcian.com
212 595 7223
Andy Benn wrote in message <3745...@news2.vip.uk.com>...
>I changed my PC to be 24-Dec-1999 and sysdate still returned 21-May-1999.
>Surely Sysdate will return the server date as it comes from SYS.DUAL in the
>first place. What platform you working on ?
>
>Andy
>
>eug...@tidalwave.net wrote in message <7habrc$p5e$1...@nnrp1.deja.com>...
>>Hello Gurus,
>>
>>Originally we thought SYSDATE in Oracle Forms meant the database
>>server's date.
>>At least it seemed that way in Forms 4.5. In Forms 5.0, SYSDATE
>>definitely gives
>>us the PC's operating system date while we wanted the database one.
>>
>>
><Snip>
>
>