|
-
Nov 7th, 2012, 05:09 PM
#1
Thread Starter
Junior Member
Sum in vb
im new to vb and i want to sum my days and months and seems not working..i convert months back to days.suppose my code below works fine but i got no sum values at the end.please help
Public Function test(length As Integer ) As String
dim month As integer=0
dim day As Integer=0
dim sum as integer
if length>31 Andalso length<367 then
length=(month * 30.4375)
month=(length)
end if
if length<31 Then
day =cstr(length)
end if
sum= year+month+day
return(sum)
End Function
thanks
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
|