Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculate Date 1

Status
Not open for further replies.

Superguppie

Technical User
Jan 19, 2005
107
NL
Hey There,

i have 2 thingss......

in a table 1 have a begindate and enddate
and i have a checkbox named SLA
when the diff. is more than 24 Hours between begindate and Enddate SLA must be unchecked when it is less than 24 Hours, it must be checked (it can be: when more than 24 Hours it must be checked, and less than 24H it must be unchecked, that doesnt matter)

Also

In a form, a subforms will show a datasheet of a table. that table has also a begindate and enddate, the datasheet must show all record except the record of today.

how can those 2 thing be done

Thanks in advance

Greet
Superguppie
 
If the field type is really "Date", it really means date time and the intrinsic date functions can calculate the difference without the aid of the additional field.



MichaelRed


 
thanks for the reaction, but the checkbox SLA is needed, (for us in business it means something) let me explane,

when we have a problem with our ISP, they need to fix it within 24 Hours.... if not then it will cost them money:D whahaah(good for us, bad for ISP) thats a Agreement we call: SLA (service level agreement)

so thats the story

 



Hi,

What Michael is saying is that the CheckBox FIELD IN YOUR TABLE is unnecesary, AND it is not best and accepted design practice, since you can, AT ANY TIME, query your data, and CALCULATE the difference between the two dates, and EVALUATE the results. The result is the meaningful data that your business is looking for.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
i understand that, but i really want a checkbox to be checked when the diff. between the 2 dates are more than 24 Hours, i know thats possible but how, can someone just explane to me how that is done please?

also my second question

In a form, a subforms will show a datasheet of a table. that table has also a begindate and enddate, the datasheet must show all record except the record of today.

can someone also explane how this is done?

Many Thanks:D

Superguppie
 
How are ya SeeThru . . .

Couldn't resist!:
Code:
[blue]   SLA = (EndDate - BegingDate <= 1)[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
As for the second question set a filter like this:
begindate<Date()

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top