C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Articles » .NET Framework »

Datetime Manipulation in Vb.net - Part 3


Posted Date: 18 Aug 2008    Resource Type: Articles    Category: .NET Framework
Author: D.Jeya kumar(JK)Member Level: Diamond    
Rating: 1 out of 5Points: 10



FromFiletime :
Datetime might be in Different format other then date format. We need to convert the other data type to Datetime.Using FromFileTime we can convert the Long Datetime to DateTime.

Syntax:
Datetime.FromFileTime(Long) return type is datetime


Dim lngdate As Long = 128559400200893068
MsgBox(DateTime.FromFileTime(lngdate))


UTC Time :
To convert the local culture time to Unversal Time(UTC) or Greenwich Mean Time we can use the FromFileTimeUtc, UtcNow() will convert the current local time to UTC time.

Syntax :

FromFileTimeUtc(Long) return type is Datatime

Now.UtcNow()return type is Datatime


Dim lngdate As Long = 128559400200893068
DateTime.FromFileTimeUtc(lngdate)


It will convert the Long date and time to UTC time


Dim dtutctime As DateTime = DateTime.UtcNow

The above will comvert the current local time to UTC time

Leap year:
To check the a year as a leap year or not .we can use the IsLeapYear function.

Syntax :
IsLeapYear()will return boolean values


Datetime.IsLeapYear(now.Year)





Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
Datetime Manipulation in Vb.net  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Datetime Manipulation in Vb.net - Part 2
Previous Resource: Easy steps to learn Java script
Return to Discussion Resource Index
Post New Resource
Category: .NET Framework


Post resources and earn money!
 
Related Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use