I dette særtema ser vi på, hvordan cloud og AI bliver fundamentet for virksomhedernes digitale forretning, og hvordan de nye muligheder for automatisering og forretningsværdi kan udnyttes uden at miste overblik, sikkerhed og menneskelig kontrol.
DateDiff("d", [Startdato], [Slutdato]) will give you how many days there are for the whole period to do this for each month would involve some programming as it will be very likley that the period will change and therefore the number of months/days will change. It also depend on HOW you want to see the result
Jeg ønsker at få et antal dage pr. måned f.eks i et sygedageregnskab hvor en person er syg i en periode ud over en kalendermåned - men dagene/timerne skal tælles pr. måned.
pecl>This IS going to take some programming so if you dont know much about that then I think you have some problmes! How the code(VBA) is depends on HOW you want to see this information!
It isnt simple to extract each month from the date interval, but when that is done the datediff function can calculate the number of days in each month. Access has some very good date functions so I suggest you take a look at those.
Function DaysInMonth(StartDate As Date, EndDate As Date, Month As Integer) As Integer
Dim RunningDate As Long DaysInMonth = 0 If EndDate > StartDate Then RunningDate = StartDate Do While RunningDate <= EndDate If DatePart("m", RunningDate) = Month Then DaysInMonth = DaysInMonth + 1 End If RunningDate = RunningDate + 1 Loop End If
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.