Home » Developer & Programmer » Forms » Calendar Date and day in database (database 10g, Developer 6I, Window XP)
Calendar Date and day in database [message #388786] Thu, 26 February 2009 04:03 Go to next message
shahzaib_4vip@hotmail.com
Messages: 376
Registered: December 2008
Location: karachi
Senior Member
Hellow Experts


I want to know that there is any option to know what is the day and time in database.if the day and date is similar with sysdate then its possible that we change our system date and automatically change database day and date?

Its because i want to make a trigger when date=...... then .......


date = database date not system date


Hope you guys understand


Thanks


Shahzaib ismail
Re: Calendar Date and day in database [message #388801 is a reply to message #388786] Thu, 26 February 2009 04:33 Go to previous messageGo to next message
cookiemonster
Messages: 12403
Registered: September 2008
Location: Rainy Manchester
Senior Member
Quote:

I want to know that there is any option to know what is the day and time in database



That's what sysdate is for, so really not sure what your issue is or what you're trying to accomplish.

Explain in more detail what you want.
Re: Calendar Date and day in database [message #388810 is a reply to message #388786] Thu, 26 February 2009 05:04 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 376
Registered: December 2008
Location: karachi
Senior Member
Thanks for your reply


Actually i want to create a trigger in button

that when date='25-mar-09' then go_block('exp')


i don't want system date i want database date because we are be able to change system date but not database date


That why i create this topic

Hope you understand


Thanks

Shahzaib ismail
Re: Calendar Date and day in database [message #388814 is a reply to message #388786] Thu, 26 February 2009 05:21 Go to previous messageGo to next message
cookiemonster
Messages: 12403
Registered: September 2008
Location: Rainy Manchester
Senior Member
Define what you mean by system date and database date.

Because to me database date = sysdate = system date.
Re: Calendar Date and day in database [message #388817 is a reply to message #388786] Thu, 26 February 2009 05:28 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 376
Registered: December 2008
Location: karachi
Senior Member
The picture show System date


Please find the attachment of System date


and i change system date to 27-feb-09


actual date is 26-feb-09


Thanks


Shahzaib
Re: Calendar Date and day in database [message #388839 is a reply to message #388817] Thu, 26 February 2009 06:16 Go to previous messageGo to next message
Littlefoot
Messages: 20888
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I'm afraid that you got it wrong because SYSDATE is not what you think it is.
Your PC        Oracle function
-----------    ---------------
System date <> SYSDATE
SYSDATE returns the current date and time set for the operating system on which the database resides.

Now, if you allow users to modify date and time on the database server, that is probably a very bad news. If the database is installed on your local PC, then create an operating system user which will lack a privilege to modify date and time.
Re: Calendar Date and day in database [message #388888 is a reply to message #388786] Thu, 26 February 2009 09:08 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 376
Registered: December 2008
Location: karachi
Senior Member
I Agree with you little foot

But when i change my computer date and time its also change my data base date and time


i want to know if there is any way that will not change my database date and time if i change my computer system date and time

for example

SELECT TO_CHAR
(SYSDATE, 'MM-DD-YYYY HH24:MI:SS') "NOW"
FROM DUAL;

NOW
-------------------
02-25-2009 20:03:50


SELECT TO_CHAR
(SYSDATE, 'MM-DD-YYYY HH24:MI:SS') "NOW"
FROM DUAL;

NOW
-------------------
02-26-2009 20:04:01



Hope you guys got any solution on it


Thanks

Shahzaib
Re: Calendar Date and day in database [message #388891 is a reply to message #388786] Thu, 26 February 2009 09:16 Go to previous messageGo to next message
cookiemonster
Messages: 12403
Registered: September 2008
Location: Rainy Manchester
Senior Member
sysdate is the current date/time of the machine the database is installed on.
Presumably your database is installed on your PC.
If you change the date/time of the machine the database is installed on you will change the value of sysdate.

There is no way round this.
Re: Calendar Date and day in database [message #388900 is a reply to message #388786] Thu, 26 February 2009 09:52 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 376
Registered: December 2008
Location: karachi
Senior Member
So there is no way that nobody will be allow to change database date and time and also system date and time or any alternative way


Basically i want to open_form at particular system date or sysdate any other option to open_form at particular date?

Any way


Thank you for reply


Shahzaib Ismail
Re: Calendar Date and day in database [message #388991 is a reply to message #388900] Thu, 26 February 2009 21:41 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Run a Java thingy on your PC that starts the form at a certain date/time. Just like PC applications sound alarms etc.

Google for 'free program scheduler'. I haven't looked for a couple of years but there used to be some quite good ones.

David
Previous Topic: function which will return multiple columns and rows values.
Next Topic: Current detail block in master detail form
Goto Forum:
  


Current Time: Fri Dec 02 18:46:13 CST 2016

Total time taken to generate the page: 0.50084 seconds