How do I handle Date and Time in VB.NET?
Working with Dates is one to think about. Especially if your data needs to be spread accross timezones Also there are different date formats to take in to consideration. VB.NET Has some good Date() Functions, one of which is demonstrated below:Example
Imports System.Math Module Module1 Sub Main () Dim Dts as Date Dts = # 10/15/2001 System.Console.WriteLine(“New Date: & DateAdd(DateInterval.Month, 22, Dts)) End Sub End Module
The above code adds 22 months to the date we declared in the Program.
Written by Sandeep Mogulla, Webmaster at www.startvbdotnet.com
Index
Sponsored links
Build IT Knowledge with Current & Trusted Content
Helps Employees Develop & Hone New Technical Programming Skills. Sign Up & Get Full Access.
Helps Employees Develop & Hone New Technical Programming Skills. Sign Up & Get Full Access.
Check Out IT Certification Preparation Materials
Sign Up With SkillSoft & Get Access to Training Materials for Over 50 Professional Certifications.
Sign Up With SkillSoft & Get Access to Training Materials for Over 50 Professional Certifications.
Six Sigma Certification
100% Online-Six Sigma Certificate from Villanova - Find Out More Now.
100% Online-Six Sigma Certificate from Villanova - Find Out More Now.
SFTP components for .NET
Add complete SSH and SFTP support to your .NET framework application
Add complete SSH and SFTP support to your .NET framework application
ASP.NET 3.5 Hosting on Windows 2008!
ASP.NET 3.5/2.0 Hosting on Windows 2008 & 2003! AJAX, LINQ, & Silverlight Ready! 3 Mo. Free!!
ASP.NET 3.5/2.0 Hosting on Windows 2008 & 2003! AJAX, LINQ, & Silverlight Ready! 3 Mo. Free!!
