Home » Developer & Programmer » Forms » Date field
Date field [message #209580] Fri, 15 December 2006 12:06 Go to next message
Messages: 329
Registered: August 2006
Senior Member

I have two date fields on the form canvas.
A and B.

In A field the date is 12/09/2006

B field date depends on A field.

I want to enter m1 or y1 in date field ,please let me know
wheather it is possible.

If i enter m1 in field b and press enter the date should be 1 month greater than A field date,.
eg: B should be 01/09/2007

if i enter y1 in field b and press enter the date should be 1 year greater than A field date

if i enter m1y1 in field b and press enter the date should first increase by 1 month and then by one year based on A field date.

Please let me know is this possible to enter char in date field.


[Updated on: Fri, 15 December 2006 12:07]

Report message to a moderator

Re: Date field [message #209596 is a reply to message #209580] Fri, 15 December 2006 14:15 Go to previous messageGo to next message
Messages: 20847
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Characters might be entered into a DATE field, but only if they are part of date format (for example, if date format is '15 December 2006'). But not the way you'd like it to ('m1y1') - it is NOT a date.

But, why would you do that? One possible solution might be creating two checkboxes: m1 and y1. They could be checked one by one, or both of them. Depending on checkbox value, add a month or a year to date stored in 'field A'.

Besides, what difference does it make if you FIRST add 1 month and THEN 1 year? Wouldn't the result be the same if you first add a year, and then a month?
Re: Date field [message #209786 is a reply to message #209596] Sun, 17 December 2006 20:43 Go to previous message
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Use a non-database field. Take the '1m', add it to 'A' then use a 'to_char' to repopulate the 'B' field. The real B date is stored in a database field that is not displayed.

Next Topic: MAYRIX forms
Goto Forum:

Current Time: Fri Oct 28 05:54:42 CDT 2016

Total time taken to generate the page: 0.14214 seconds