Stump the Panel: SharePoint Q&A

Immediate solutions for common SharePoint questions
It is currently Wed Jun 19, 2013 1:19 pm

All times are UTC - 5 hours [ DST ]


Forum rules


What you are viewing is an archive of Stump the Panel. It remains for reference purposes. Please post all new questions on NothingButSharePoint.com
https://www.nothingbutsharepoint.com/sites/eusp/Forum



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Time between two dates taking into account a Half Day
PostPosted: Wed Jan 27, 2010 3:18 pm 
Offline

Joined: Mon Jan 04, 2010 2:23 pm
Posts: 82
In my vacation database, I work out the difference between two taking in to account weekends etc - all coutesy of Dessie.

I have introduced a Half Day field that people naturally take - either morning or afternoon.

What I need to be able to do is show that in the calculation.

Here is Dessie's work of art

=IF(AND((WEEKDAY(To,2))<(WEEKDAY(From,2)),((WEEKDAY(From,2))-(WEEKDAY(To,2)))>1),(((DATEDIF(From,To,"D")+1))-(FLOOR((DATEDIF(From,To,"D")+1)/7,1)*2)-2),(((DATEDIF(From,To,"D")+1))-(FLOOR((DATEDIF(From,To,"D")+1)/7,1)*2)))

Any help would be appreciated.

Iain


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group