Accounting Periods

accounting , periods , dates Springfield, United States
  • 11 years ago

    Hello Programmers, I need to figure out how to create accounting periods (ie., monthly, quarterly and yearly) using VB with Visual Studio 2008 and SQL Server. Thanks for any assistance!

  • 11 years ago

    yes u can create it....This is code by how u can get which is the quarter from given date

    Public Function getFinancialYear(ByVal dt As Date) As String 'If DatePart(DateInterval.Quarter, dt, FirstDayOfWeek.Sunday, FirstWeekOfYear.Jan1) = 1 Then Dim FinDate As Date = Convert.ToDateTime(dt).ToString("dd/MM/yyyy") If DatePart(DateInterval.Quarter, FinDate) = 1 Then //first quarter ----jan 01 to 31st marc
    Else //second/third/fourth quarter End If End Function

  • 11 years ago

    Thank you Viral... I'll let you know how it goes.

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“The trouble with programmers is that you can never tell what a programmer is doing until it's too late.” - Seymour Cray