Home » Developer & Programmer » Forms » default value for dates
default value for dates [message #185709] Thu, 03 August 2006 03:49 Go to next message
cong
Messages: 25
Registered: June 2006
Junior Member
i have parameters start date and end date. if the user doesn't enter any value, default value for end date is null. with start date, is the most logical thing to do is to get the earliest date from the database? i'm querying from 3 big tables, this might slow down the process. thanks!
Re: default value for dates [message #185710 is a reply to message #185709] Thu, 03 August 2006 03:50 Go to previous messageGo to next message
cong
Messages: 25
Registered: June 2006
Junior Member
correction pls., default value for the end date is sysdate.
Re: default value for dates [message #185726 is a reply to message #185710] Thu, 03 August 2006 05:23 Go to previous messageGo to next message
Littlefoot
Messages: 20891
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
If searching for the mimimum date from the table takes too long, either force user to enter value, or - as a default - use date for which you are SURE is minimum (for example, to_date('01.01.0001', 'dd.mm.yyyy')).
Re: default value for dates [message #186222 is a reply to message #185726] Mon, 07 August 2006 02:17 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
I suggest using either 1901 or 1801 as your year. Using 0001 has issues when you come to do the number of days between particular dates. Most calendars changed by around 16 days between the mid-1500s and the mid-1600s. NEVER use 0000 as a year as it did and does not exist.

David
Previous Topic: Doubt in form
Next Topic: installing translation hub in 10 g
Goto Forum:
  


Current Time: Sun Dec 04 04:29:04 CST 2016

Total time taken to generate the page: 0.12876 seconds