Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SYSDATE in Oracle Forms?

3,261 views
Skip to first unread message

eug...@tidalwave.net

unread,
May 11, 1999, 3:00:00 AM5/11/99
to
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.

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

unread,
May 12, 1999, 3:00:00 AM5/12/99
to
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.

Simon Hedges
Gloucester
UK

eug...@tidalwave.net wrote in message <7habrc$p5e$1...@nnrp1.deja.com>...

Suzanne Edgecombe

unread,
May 12, 1999, 3:00:00 AM5/12/99
to
Sysdate (like "user") is a database "virtual" column so if you include it
in a select statement, you will get the system date off the database
server, not the application server.

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>...
> >

Thierry Thomas

unread,
May 12, 1999, 3:00:00 AM5/12/99
to
eug...@tidalwave.net wrote:
> 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.

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

Giedrius

unread,
May 13, 1999, 3:00:00 AM5/13/99
to
Hi,

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

unread,
May 28, 1999, 3:00:00 AM5/28/99
to
It depends on the version of Forms you are running.
Some return the PC date, some return sysdate.
If you want to make sure you get the sysdate
use
select sysdate from dual

--
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>
>
>

0 new messages