Skip to main content

Posts

Showing posts with the label fiscal year

Vb.Net Code to get Financial Year

Function GETFINYR(ByVal strDate) Dim strDt, strenddt, strstdt Dim strdd, strmm, stryy, strst_dt, strend_dt Dim date1, enddate, startdate strDt = Split(strDate, "/") strdd = strDt(0) strmm = strDt(1) stryy = strDt(2) If Right(stryy, 2) = "99" Then strend_dt = "31/03/" & Left(stryy, 2) + 1 & "00" Else If Right(stryy, 1) <> "9" Then strend_dt = "31/03/" & Left(stryy, 3) & Right(stryy, 1) + 1 Else strend_dt = "31/03/" & Left(stryy, 2) & Right(stryy, 2) + 1 End If End If strenddt = Split(strend_dt, "/") strst_dt = "01/04/" & stryy strstdt = Split(strst_dt, "/") date1 = CDate(CInt(stryy) & "/" & CInt(strmm) & "/" & CInt(strdd)) enddate = CDate(CInt(strenddt(2)) & "/" & CInt(strenddt(1)) & "/" & CInt(strenddt(0))) startdat...