|
|
![]() |
| Thread Tools | Search this Thread |
#1
| |||
| |||
find period in days / hours excluding weekdays between two days? Hi, Is there any way of calculating the total period between the two dates in days or hrs excluding the weekdays? |
#2
| |||
| |||
Re: find period in days / hours excluding weekdays between two days? USE DateDiff Function DateDiff(DateInterval.Day, dtmStart, dtmEnd) Code: Public Overloads Function DateDiff( _ ByVal Interval As String, _ ByVal Date1 As Object, _ ByVal Date2 As Object, _ Optional ByVal DayOfWeek As FirstDayOfWeek = FirstDayOfWeek.Sunday, _ Optional ByVal WeekOfYear As FirstWeekOfYear = FirstWeekOfYear.Jan1 _ ) As Long You need to assign values to dtmStart(start date) & dtmEnd(end date). http://msdn.microsoft.com/en-us/libr...6f(vs.71).aspx |
#3
| |||
| |||
Re: find period in days / hours excluding weekdays between two days? I have the same question for python language? Please help me. |
#4
| |||
| |||
Re: find period in days / hours excluding weekdays between two days? Python(Script) This will return the number of days between two dates. In the script I'm using ZopeTime but I can be changed if necessary. Most of the clues to this puzzle were gathered from the Zope List. Source from DateTime import DateTime date1 = DateTime('2001/10/06 14:00:00') date2 = context.ZopeTime() return str(date1 - date2)[:2] Add a script(Python) called time_lapse and paste the source from above. The returned number of days can then be referenced with the <dtml-var time_lapse> for details: http://www.zopelabs.com/cookbook/997725258 |
![]() |
|
Tags: days, hours, period, python |
Thread Tools | Search this Thread |
|
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to calculate pay period between interval of 15 days | Bala!aditya | MS Office Support | 2 | 28-01-2012 03:43 PM |
What is the formula for Excel to add days excluding holidays | Krupanath | MS Office Support | 2 | 24-01-2012 02:08 PM |
Windows Vista Trial Period Extension for 120 Days | FaMe FacToR | Tips & Tweaks | 2 | 17-05-2009 07:24 PM |
Rearm and Extend Free Usage (Activation Grace Period) Windows 7 to 120 Days | Rebecca.j | Tips & Tweaks | 0 | 06-11-2008 06:10 PM |
Duration shown in days(need) to display hours | The Man | Microsoft Project | 0 | 23-09-2008 05:26 PM |