Datediff Once again

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have a field "Account opened on" and i would like to calculate the date
difference between "Account opened on" and quarterly date related.
for example if "Account opened on" is May 16, 2007 the I would like to
count the in days difference between May 16 2007 and June 30 2007 (end of
the second quarter)
I tried following expression but it does not work

Datediff("d",[Account opened on],("q2",[Account opened on]

Please help
 
just to make things clearrer, i havr to use the fiels "Account opened on" and
end date of corresponding quarter I cant use dates themselves.

Thanks once again
 
senkurion said:
Hello,

I have a field "Account opened on" and i would like to calculate the date
difference between "Account opened on" and quarterly date related.
for example if "Account opened on" is May 16, 2007 the I would like to
count the in days difference between May 16 2007 and June 30 2007 (end of
the second quarter)
I tried following expression but it does not work

Datediff("d",[Account opened on],("q2",[Account opened on]


Datediff("d",[Account opened on],DateSerial(Year([Account
opened on]), 3*((Month([Account opened on])-1)\3)+4, 0)
 
Thanks Marshal,
Looks like I was not clear enough in my question , my mistake

I have one question on your expression, will that work for any other dates
say like Jun 3, 2007?? or say if i want to calculate the day difference
between feb 5 and first quarter of 2007 or say day difference between October
25 and rest of the quarter.Thanks




Marshall Barton said:
senkurion said:
Hello,

I have a field "Account opened on" and i would like to calculate the date
difference between "Account opened on" and quarterly date related.
for example if "Account opened on" is May 16, 2007 the I would like to
count the in days difference between May 16 2007 and June 30 2007 (end of
the second quarter)
I tried following expression but it does not work

Datediff("d",[Account opened on],("q2",[Account opened on]


Datediff("d",[Account opened on],DateSerial(Year([Account
opened on]), 3*((Month([Account opened on])-1)\3)+4, 0)
 
What makes you think you were not clear enough?

Did you try the expression I posted? If not, why not? If
you did, what was wrong with the result?
--
Marsh
MVP [MS Access]

Looks like I was not clear enough in my question , my mistake

I have one question on your expression, will that work for any other dates
say like Jun 3, 2007?? or say if i want to calculate the day difference
between feb 5 and first quarter of 2007 or say day difference between October
25 and rest of the quarter.Thanks


Marshall Barton said:
Datediff("d",[Account opened on],DateSerial(Year([Account
opened on]), 3*((Month([Account opened on])-1)\3)+4, 0)
senkurion said:
I have a field "Account opened on" and i would like to calculate the date
difference between "Account opened on" and quarterly date related.
for example if "Account opened on" is May 16, 2007 the I would like to
count the in days difference between May 16 2007 and June 30 2007 (end of
the second quarter)
I tried following expression but it does not work

Datediff("d",[Account opened on],("q2",[Account opened on]
 
Sorry,

Text alignment was right hand side so could not see the result of the
expression. It worked perfectly well. Thank you very much.

Marshall Barton said:
What makes you think you were not clear enough?

Did you try the expression I posted? If not, why not? If
you did, what was wrong with the result?
--
Marsh
MVP [MS Access]

Looks like I was not clear enough in my question , my mistake

I have one question on your expression, will that work for any other dates
say like Jun 3, 2007?? or say if i want to calculate the day difference
between feb 5 and first quarter of 2007 or say day difference between October
25 and rest of the quarter.Thanks


Marshall Barton said:
Datediff("d",[Account opened on],DateSerial(Year([Account
opened on]), 3*((Month([Account opened on])-1)\3)+4, 0)
senkurion wrote:
I have a field "Account opened on" and i would like to calculate the date
difference between "Account opened on" and quarterly date related.
for example if "Account opened on" is May 16, 2007 the I would like to
count the in days difference between May 16 2007 and June 30 2007 (end of
the second quarter)
I tried following expression but it does not work

Datediff("d",[Account opened on],("q2",[Account opened on]
 
Back
Top