M
MyVi
Hi everyone.
Let's see. We have this:
if Date() = MONDAY then X =Date() (so, today)
if Date() = TUSDAY then X = Date() -1 (so, yesterday)
if Date() = WEDNESDAY then X = Date() - 2 (so, the day before
yesterday)
if Date() = THRUSDAY then X = Date() - 3
if Date() = FRIDAY then X = Date() - 4
if Date() = SATURDAY then X = Date() + 2 (so, day after tomorrow)
if Date() = SUNDAY then X = Date() + 1 (so, tomorrow)
NOTE: when I say "MONDAY" I mean that DATE() can be equal to a day that
could be monday, oct 31st of 2005. So we don't really mind the day,
month and year of the date but the weekday itself).
Well, what I want is to use the function Switch to make these
calculations and to get one of those resoults depending on DATE(). But
what I donno is how to write properly the function Switch to do so.
As well, what we have is (as first thing) this other function:
=DLookup("[CODIGO CLIENTE]";"CAL_RESULTADO";"[_DIA]=#31/10/2005#") ,
and I need to use the Switch function to get the correct DATE all the
time (instead of that #31/10/2005#).
So, what I need is to mount the Switch properly that will give me the
final resoult date to be into "[_DIA]= ....date...")
Any clue on how to do this?
Thank you
Vic
Let's see. We have this:
if Date() = MONDAY then X =Date() (so, today)
if Date() = TUSDAY then X = Date() -1 (so, yesterday)
if Date() = WEDNESDAY then X = Date() - 2 (so, the day before
yesterday)
if Date() = THRUSDAY then X = Date() - 3
if Date() = FRIDAY then X = Date() - 4
if Date() = SATURDAY then X = Date() + 2 (so, day after tomorrow)
if Date() = SUNDAY then X = Date() + 1 (so, tomorrow)
NOTE: when I say "MONDAY" I mean that DATE() can be equal to a day that
could be monday, oct 31st of 2005. So we don't really mind the day,
month and year of the date but the weekday itself).
Well, what I want is to use the function Switch to make these
calculations and to get one of those resoults depending on DATE(). But
what I donno is how to write properly the function Switch to do so.
As well, what we have is (as first thing) this other function:
=DLookup("[CODIGO CLIENTE]";"CAL_RESULTADO";"[_DIA]=#31/10/2005#") ,
and I need to use the Switch function to get the correct DATE all the
time (instead of that #31/10/2005#).
So, what I need is to mount the Switch properly that will give me the
final resoult date to be into "[_DIA]= ....date...")
Any clue on how to do this?
Thank you
Vic