Code 1
Code 2Code:IIf([Work_Type]="I",(Format((CStr(Fix(Sum([Expr7]))*24+Hour(Sum([Expr7])))),"00")),0)
Hi can anyone help me to combine above two codesCode:IIf([Work_Type]="I",(Right("0" & CStr(Minute(Sum([Expr7]))),2)),0)
Code 1
Code 2Code:IIf([Work_Type]="I",(Format((CStr(Fix(Sum([Expr7]))*24+Hour(Sum([Expr7])))),"00")),0)
Hi can anyone help me to combine above two codesCode:IIf([Work_Type]="I",(Right("0" & CStr(Minute(Sum([Expr7]))),2)),0)
Show sample data and the desired output.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Hi
i'm trying to sum the time which can be less than or greater than 24hrs. So here i'm calculating the hours and minutes separately.
time cannot be greater than 24 hours - if the sum is greater than 24 hours you will get days and time
suggest show some example data
Also, looks like you are not aware of how time and dates are stored - they are stored as doubles
?now()
15/10/2020 09:36:13
?cdbl(now())
44119.4001851852
the time element is the bit after the decimal point and is the number of seconds today divided by 86400 which is the number of seconds in a day.
Hi all!
Eranka,
give a try to this code:
Code:IIf([Work_Type]="I",Int(Sum([Expr7])*24) & Format(Sum([Expr7]),"\:nn"),0)