Należność za pracę w czasie

0

czy da się jakoś w access zrobić coś takiego: obliczyć czas pomiędzy godzinami i pomnożyć go razy kwotę pieniędzy za godzinę? np. ze skokiem co 15 min. moim problemem jest to, że nie mogę wykonać działania, ponieważ są w różnych typach - kwota to tekst a czas to typ data/godzina. Próbowałem zmienić typ data/godzina na tekst z maską ale nie da się wówczas obliczyć już nawet samego czasu trwania. Można jakoś rozbić tą date/godzinę na osobne: h i mm?
W normalnym obliczaniu daty z data/godzina i pomnożeniu jej przez tekst (kwotę) wychodzą jakieś dziwne liczby ale to mnie akurat nie dziwi- zastanawia mnie sam fakt że takie działanie się wykonuje. Gdybym poznał choć jego kolejność to by mi dało szanse na przemyślenie tego problemu:)

Czekam choć na propozycję rozwiązania tego problemu.

Pozdrawiam

rozwiązałem problem dość mało profesjonalnie:
If txt_czas = "0000" Then
txt_przelicznik = 0
else
If txt_czas = "0000" Then
txt_przelicznik = 0.25
Else
If txt_czas = "0000" Then
txt_przelicznik = 0.5
Else
If txt_czas = "0000" Then
txt_przelicznik = 0.75
Else
If txt_czas = "0100" Then
txt_przelicznik = 1
Else
If txt_czas = "0100" Then
txt_przelicznik = 1.25
Else
If txt_czas = "0100" Then
txt_przelicznik = 1.5
Else
If txt_czas = "0100" Then
txt_przelicznik = 1.75
Else
If txt_czas = "0200" Then
txt_przelicznik = 2
Else
If txt_czas = "0200" Then
txt_przelicznik = 2.25
Else
If txt_czas = "0200" Then
txt_przelicznik = 2.5
Else
If txt_czas = "0200" Then
txt_przelicznik = 2.75
Else
If txt_czas = "0300" Then
txt_przelicznik = 3
Else
If txt_czas = "0300" Then
txt_przelicznik = 3.25
Else
If txt_czas = "0300" Then
txt_przelicznik = 3.5
Else
If txt_czas = "0300" Then
txt_przelicznik = 3.75
Else
If txt_czas = "0400" Then
txt_przelicznik = 4
Else
If txt_czas = "0400" Then
txt_przelicznik = 4.25
Else
If txt_czas = "0400" Then
txt_przelicznik = 4.5
Else
If txt_czas = "0400" Then
txt_przelicznik = 4.75
Else
If txt_czas = "0500" Then
txt_przelicznik = 5
Else
If txt_czas = "0500" Then
txt_przelicznik = 5.25
Else
If txt_czas = "0500" Then
txt_przelicznik = 5.5
Else
If txt_czas = "0500" Then
txt_przelicznik = 5.75
Else
If txt_czas = "0600" Then
txt_przelicznik = 6
Else
If txt_czas = "0600" Then
txt_przelicznik = 6.25
Else
If txt_czas = "0600" Then
txt_przelicznik = 6.5
Else
If txt_czas = "0600" Then
txt_przelicznik = 6.75
Else
If txt_czas = "0700" Then
txt_przelicznik = 7
Else
If txt_czas = "0700" Then
txt_przelicznik = 7.25
Else
If txt_czas = "0700" Then
txt_przelicznik = 7.5
Else
If txt_czas = "0700" Then
txt_przelicznik = 7.75
Else
If txt_czas = "0800" Then
txt_przelicznik = 8
Else
If txt_czas = "0800" Then
txt_przelicznik = 8.25
Else
If txt_czas = "0800" Then
txt_przelicznik = 8.5
Else
If txt_czas = "0800" Then
txt_przelicznik = 8.75
Else
If txt_czas = "0900" Then
txt_przelicznik = 9
Else
If txt_czas = "0900" Then
txt_przelicznik = 9.25
Else
If txt_czas = "0900" Then
txt_przelicznik = 9.5
Else
If txt_czas = "0900" Then
txt_przelicznik = 9.75
Else
If txt_czas = "1000" Then
txt_przelicznik = 10
Else
If txt_czas = "1000" Then
txt_przelicznik = 10.25
Else
If txt_czas = "1000" Then
txt_przelicznik = 10.5
Else
If txt_czas = "1000" Then
txt_przelicznik = 10.75
Else
If txt_czas = "1100" Then
txt_przelicznik = 11
Else
If txt_czas = "1100" Then
txt_przelicznik = 11.25
Else
If txt_czas = "1100" Then
txt_przelicznik = 11.5
Else
If txt_czas = "1100" Then
txt_przelicznik = 11.75
Else
If txt_czas = "1200" Then
txt_przelicznik = 12
Else
If txt_czas = "1200" Then
txt_przelicznik = 12.25
Else
If txt_czas = "1200" Then
txt_przelicznik = 12.5
Else
If txt_czas = "1200" Then
txt_przelicznik = 12.75
Else
If txt_czas = "1300" Then
txt_przelicznik = 13
Else
If txt_czas = "1300" Then
txt_przelicznik = 13.25
Else
If txt_czas = "1300" Then
txt_przelicznik = 13.5
Else
If txt_czas = "1300" Then
txt_przelicznik = 13.75
Else
If txt_czas = "1400" Then
txt_przelicznik = 14
Else
If txt_czas = "1400" Then
txt_przelicznik = 14.25
Else
If txt_czas = "1400" Then
txt_przelicznik = 14.5
Else
If txt_czas = "1400" Then
txt_przelicznik = 14.75
Else
If txt_czas = "1500" Then
txt_przelicznik = 15
Else
If txt_czas = "1500" Then
txt_przelicznik = 15.25
Else
If txt_czas = "1500" Then
txt_przelicznik = 15.5
Else
If txt_czas = "1500" Then
txt_przelicznik = 15.75
Else
If txt_czas = "1600" Then
txt_przelicznik = 16
Else
If txt_czas = "1600" Then
txt_przelicznik = 16.25
Else
If txt_czas = "1600" Then
txt_przelicznik = 16.5
Else
If txt_czas = "1600" Then
txt_przelicznik = 16.75
Else
If txt_czas = "1700" Then
txt_przelicznik = 17
Else
If txt_czas = "1700" Then
txt_przelicznik = 17.25
Else
If txt_czas = "1700" Then
txt_przelicznik = 17.5
Else
If txt_czas = "1700" Then
txt_przelicznik = 17.75
Else
If txt_czas = "1800" Then
txt_przelicznik = 18
Else
If txt_czas = "1800" Then
txt_przelicznik = 18.25
Else
If txt_czas = "1800" Then
txt_przelicznik = 18.5
Else
If txt_czas = "1800" Then
txt_przelicznik = 18.75
Else
If txt_czas = "1900" Then
txt_przelicznik = 19
Else
If txt_czas = "1900" Then
txt_przelicznik = 19.25
Else
If txt_czas = "1900" Then
txt_przelicznik = 19.5
Else
If txt_czas = "1900" Then
txt_przelicznik = 19.75
Else
txt_przelicznik = "BŁĄD"
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If

0

Po pierwsze tu masz blad:

If txt_czas = "01:15:00" Then
txt_przelicznik = 1.25

A po drugie:

  1. rodzielasz godzine i minuty na dwie liczby
  2. przelicznik to godzina + (minuty/60)*0,15;
0

Dlaczego błąd?:D bo nie widzę :) A jak to rozdzielić? gdybym to wiedział pomogło by mi to znacząco:)

1 użytkowników online, w tym zalogowanych: 0, gości: 1