Hi Guest   Join Now | Sign in
 
News ticker   Planetz Ads:                 

 Home

  Test Prep   Career   Jobs   Tutors   Answer   Blog

Share
 Home ›› Career ›› Tutorials ›› VB 6

 

Asp Programming Tutorials

   
 
   
 
 
 
›› ASP ›› ASP.NET ›› AJAX C# ›› C/C++ ›› VB.NET  ›› Web Services ›› Assembly  ›› Cobol 
›› ColdFusion  ›› Delphi ›› Flash ›› HTML  ›› J2EE ›› Java ›› JavaScript›› JSP›› Perl ›› PHP
›› Python ›› QBasic ›› MSSQL ›› VB 6›› XML ›› Networking ›› windows ›› Linux ›› MySql
 

Learn how to use the Visual Basic DateDiff function

 

The DateDiff function returns a long integer specifying the number of time intervals between two specified dates.

 

Syntax:

DateDiff(interval, date1, date2[, firstdayofweek[, firstweekofyear]])

 

The DateDiff function syntax has these parts:

 

Part

Description

interval

Required. String expression that is the interval of time you use to calculate the difference between date1 and date2..

 

The string expression can be any of the following:

 

Expression

Description

"yyyy"

Year

"q"

Quarter

"m"

Month

"y"

Day of year

"d"

Day

"w"

Weekday

"ww"

Week

"h"

Hour

"n"

Minute

"s"

Second

 

date1, date2

Required; Date. The two dates you want to use in the calculation

 

firstdayofweek

Optional. A constant that specifies the first day of the week. If not specified, Sunday is assumed.

 

firstweekofyear

Optional. A constant that specifies the first week of the year. If not specified, the first week is assumed to be the week in which January 1 occurs.

 

   
   
 
Top Indian Institutes
Top Universities
Top Medical Institutes
Top Engineering Col
Top B Schools
Top Commerce Colleges
Top Science Colleges
Top Indian Schools
Top Law Colleges
   
 
 

Help Desk

Post Your Doubts
Contact Us
Write Views
Suggest this site
Advertise with us
   
   
PLANET E TUTORS © Copyrights 2003- 2010. All Rights Reserved Home | Support | Disclaimer | Privacy Policy | Terms | Advertise