-
April 16th, 2019, 11:55 AM
#1
function for to calculate night shift and hours currents
Hi, I need a function that calculates the daytime and nighttime hours within a shift, for example 16 hour of entry to 01 hour of departure of de next day, from 16 to 22 = 6 hours (daytime), and from 22 to 01 of the next morning = 3 hours (nighttime), total hours = 9 hours
thanks for all
-
April 16th, 2019, 01:31 PM
#2
Re: function for to calculate night shift and hours currents
Did you try to use Date data type variables?
Victor Nijegorodov
-
April 16th, 2019, 03:06 PM
#3
Re: function for to calculate night shift and hours currents
Originally Posted by VictorN
yes, but I do not know much about programming, I do not know how to do it
-
April 16th, 2019, 03:09 PM
#4
Re: function for to calculate night shift and hours currents
Originally Posted by juanfrasantos
yes, but I do not know much about programming, I do not know how to do it
Then learn the programming!
And search for the reliable sample code!
Victor Nijegorodov
-
April 18th, 2019, 06:09 AM
#5
Re: function for to calculate night shift and hours currents
i search but not find sample code about this, please help me, thanks
-
April 18th, 2019, 09:06 AM
#6
Re: function for to calculate night shift and hours currents
Have a look at the DateAdd() and DateDiff() functions
Always use [code][/code] tags when posting code.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|