Click here to Skip to main content
16,005,734 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: image editor Pin
Dave Kreskowiak11-Oct-07 5:19
mveDave Kreskowiak11-Oct-07 5:19 
AnswerRe: image editor Pin
Ajay.k_Singh11-Oct-07 7:24
Ajay.k_Singh11-Oct-07 7:24 
QuestionCoding issue Pin
Sam Heller11-Oct-07 4:18
Sam Heller11-Oct-07 4:18 
AnswerRe: Coding issue Pin
Mbire11-Oct-07 5:18
Mbire11-Oct-07 5:18 
GeneralRe: Coding issue Pin
Sam Heller11-Oct-07 23:34
Sam Heller11-Oct-07 23:34 
GeneralRe: Coding issue Pin
Mbire12-Oct-07 0:13
Mbire12-Oct-07 0:13 
GeneralRe: Coding issue Pin
Sam Heller12-Oct-07 0:29
Sam Heller12-Oct-07 0:29 
GeneralRe: Coding issue Pin
Mbire12-Oct-07 2:24
Mbire12-Oct-07 2:24 
public function getTimeWorked(ByVal StartTime as date, ByVal Duration as TimeSpan, _
ByVal EndTime as date, ByVal LunchStartTime as date, ByVal LunchDuration as TimeSpan) as TimeSpan

dim ActualTimeWorked as TimeSpan
dim TimeWorked as TimeDuration = StartTime - EndTime
if (StartTime < LunchStartTime) and (EndTime > (LunchStartTime + LunchDuration)) then
      ActualTimeWorked = TimeWorked - LunchDuration 
endif
return ActualTimeWorked
end if



Within the same if statement, u can modify the code to get if the guy finished work DURING lunch period and do the necessary calculations or if he started DURING the lunch period and calculate accordingly.
QuestionUpdating the DataSet Pin
kvs_240711-Oct-07 4:07
kvs_240711-Oct-07 4:07 
AnswerRe: Updating the DataSet Pin
Vimalsoft(Pty) Ltd11-Oct-07 4:21
professionalVimalsoft(Pty) Ltd11-Oct-07 4:21 
GeneralRe: Updating the DataSet Pin
kvs_240711-Oct-07 21:32
kvs_240711-Oct-07 21:32 
GeneralRe: Updating the DataSet Pin
Vimalsoft(Pty) Ltd11-Oct-07 23:55
professionalVimalsoft(Pty) Ltd11-Oct-07 23:55 
GeneralRe: Updating the DataSet Pin
kvs_240712-Oct-07 1:57
kvs_240712-Oct-07 1:57 
QuestionCustom Property in Custom DataGridViewColumn Pin
Kimalla11-Oct-07 3:17
Kimalla11-Oct-07 3:17 
QuestionCan tacbles in access Start with a number Pin
Mr Oizo11-Oct-07 3:17
Mr Oizo11-Oct-07 3:17 
AnswerRe: Can tacbles in access Start with a number Pin
Guffa11-Oct-07 4:13
Guffa11-Oct-07 4:13 
AnswerRe: Can tacbles in access Start with a number Pin
Dave Kreskowiak11-Oct-07 4:28
mveDave Kreskowiak11-Oct-07 4:28 
Questiondetermine selected index changed event of combo of datagridview Pin
Rupesh Kumar Swami11-Oct-07 2:54
Rupesh Kumar Swami11-Oct-07 2:54 
AnswerRe: determine selected index changed event of combo of datagridview Pin
Dave Kreskowiak11-Oct-07 5:11
mveDave Kreskowiak11-Oct-07 5:11 
GeneralRe: determine selected index changed event of combo of datagridview Pin
WhiteGirl2312-Oct-07 2:49
WhiteGirl2312-Oct-07 2:49 
GeneralRe: determine selected index changed event of combo of datagridview Pin
Dave Kreskowiak12-Oct-07 13:15
mveDave Kreskowiak12-Oct-07 13:15 
QuestionUsing the Global Assembly Cache. Pin
vcrespo11-Oct-07 1:55
vcrespo11-Oct-07 1:55 
AnswerRe: Using the Global Assembly Cache. Pin
Mbire11-Oct-07 2:39
Mbire11-Oct-07 2:39 
GeneralRe: Using the Global Assembly Cache. Pin
vcrespo11-Oct-07 3:02
vcrespo11-Oct-07 3:02 
GeneralRe: Using the Global Assembly Cache. Pin
Mbire11-Oct-07 4:36
Mbire11-Oct-07 4:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.