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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

InfoPath subtracting two dates 2

Status
Not open for further replies.

BAWC01

Technical User
Nov 23, 2005
79
CH
Hi

Does anybody know if it is possible to subtract two dates which have been selected from date pickboxes and leave an integer in a field

Thanks

 
It is possible but you have to use code - Infopath is (IMHO) a complete dog to work with.

Please see this link:


Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Seeing how it is a dog

Is it possible to do the same date calculation in Word.

I want to improve the look of an ugly excel sheet and think Word or Infopath would look better ?

thanks

Phil
 
Excel can be formatted to look as good as Word or anything else

AFAIK, Word processes dates in the same way as excel ie.

Date2 - Date 1 = Difference in dates

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Hi Phil,

You can certainly subtract one date from another in Word, using either a macro or a formula field.

The macro approach is easiest, and the code is the same as you'd use in Excel.

The formula field approach is much more complex than date subtractions in Excel but, if you want to have a go, check out my 'Date Calc' tutorial at:
There you'll find pre-coded examples you can use.

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top