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

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.

Thanks,
Srinivas

[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
Littlefoot
Messages: 21823
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
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS 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.

David
Previous Topic: REMOTE LOGIN & SHUTDOWN
Next Topic: MAYRIX forms
Goto Forum:
  


Current Time: Sat Feb 08 19:10:34 CST 2025