DateaddDate

  • Thread starter Thread starter News
  • Start date Start date
N

News

Hello all,
I am trying to figure out how to calcualte a Field (Date) from another Field
in the same table.
I tried using the Dateadd expression as well as a query, I just cant seem
to get it right.
Here is what i am trying to do:

Field 1:
5/05/2002

I want the value of Field 2 to be 30 Years later: 5/05/2032

Can anyone help me out? Thank you.
Vincent
 
Vincent,
try this as the control source of your 2nd textbox:

=DateAdd("yyyy",30,[yourtextboxname])
 
Vincent,
also, if you had a query with [date] as the field name, you could put
this as a new field (named "newdate") in that query to get the result you
want:

newdate: DateAdd("yyyy",30,[date])
 
Awesome, thank you !
You guys are so good at making people like me feel so stupid !

[email protected] via AccessMonster.com said:
Vincent,
also, if you had a query with [date] as the field name, you could put
this as a new field (named "newdate") in that query to get the result you
want:

newdate: DateAdd("yyyy",30,[date])
Hello all,
I am trying to figure out how to calcualte a Field (Date) from another
Field
in the same table.
I tried using the Dateadd expression as well as a query, I just cant seem
to get it right.
Here is what i am trying to do:

Field 1:
5/05/2002

I want the value of Field 2 to be 30 Years later: 5/05/2032

Can anyone help me out? Thank you.
Vincent
 
Question 2: al little more complex:

1Field= a date
2field= Text (8 Possible options)
I want Field 3 to Display a Date which =Field 1 (DateAdd) but based on the
text of Field 2

Filed 2 will always use one of the 8 Options, no exceptions (if that makes
it easier to code ! )

ie:
Field1: 10/20/2000
Field2: RADM
Field3: 10/20/20030 (adding 30 Years to the Date of Field 1)

Field1: 10/20/2000
Field2: RVADM
Field3: 10/20/2035 (adding 35 Years to the Date of Field 1)
and so on ....


What do you think?
Does it have something to do with conditions?

Vincent






[email protected] via AccessMonster.com said:
Vincent,
try this as the control source of your 2nd textbox:

=DateAdd("yyyy",30,[yourtextboxname])


Hello all,
I am trying to figure out how to calcualte a Field (Date) from another
Field
in the same table.
I tried using the Dateadd expression as well as a query, I just cant seem
to get it right.
Here is what i am trying to do:

Field 1:
5/05/2002

I want the value of Field 2 to be 30 Years later: 5/05/2032

Can anyone help me out? Thank you.
Vincent
 
1Field= a date
2field= Text (8 Possible options)
I want Field 3 to Display a Date which =Field 1 (DateAdd) but based on the
text of Field 2

Filed 2 will always use one of the 8 Options, no exceptions (if that makes
it easier to code ! )

ie:
Field1: 10/20/2000
Field2: RADM
Field3: 10/20/20030 (adding 30 Years to the Date of Field 1)

Field1: 10/20/2000
Field2: VADM
Field3: 10/20/2035 (adding 35 Years to the Date of Field 1)
and so on ....


What do you think?
Does it have something to do with conditions?

Vincent






[email protected] via AccessMonster.com said:
Vincent,
try this as the control source of your 2nd textbox:

=DateAdd("yyyy",30,[yourtextboxname])


Hello all,
I am trying to figure out how to calcualte a Field (Date) from another
Field
in the same table.
I tried using the Dateadd expression as well as a query, I just cant
seem
to get it right.
Here is what i am trying to do:

Field 1:
5/05/2002

I want the value of Field 2 to be 30 Years later: 5/05/2032

Can anyone help me out? Thank you.
Vincent
 
Back
Top