Academic Tutorials



English | French | Portugese | German | Italian
Google

Home Source Codes E-Books Downloads Contact Us About Us

VB.NET
Introduction to VB.NET
Visual Basic Scripts
Variables and Data Types
Arrays and Collections
Arithmetic and String Operations
Relational and Logical Operations
Math and String Functions
Date and Time Functions
Display Formats
Subprograms
Functions
The If Statement
The If...Else Statement
The Else...If Statement
The Select...Case Statement
The For...Next Statement
The For Each...Next Statement
The While...End While Statement
The Do...Loop Statement

HTML Tutorials
HTML Tutorial
XHTML Tutorial
CSS Tutorial
TCP/IP Tutorial
XML Tutorials
XML Tutorial
XSL Tutorial
XSLT Tutorial
DTD Tutorial
Schema Tutorial
XForms Tutorial
XSL-FO Tutorial
XML DOM Tutorial
XLink Tutorial
XQuery Tutorial
XPath Tutorial
XPointer Tutorial
RDF Tutorial
SOAP Tutorial
WSDL Tutorial
RSS Tutorial
WAP Tutorial
Web Services Tutorial
Browser Scripting
JavaScript Tutorial
VBScript Tutorial
AJAX Tutorial
DHTML Tutorial
HTML DOM Tutorial
WMLScript Tutorial
E4X Tutorial
Server Scripting
ASP Tutorial
PHP Tutorial
PERL Tutorial
SQL Tutorial
ADO Tutorial
.NET (dotnet)
Microsoft.Net
XML Web Services
ASP.Net
.Net Mobile
C# : C Sharp
ADO.NET
VB.NET
Multimedia
SVG Tutorial
Flash Tutorial
Media Tutorial
SMIL Tutorial
Web Building
Web Browsers
Web Hosting
W3C Tutorial
Web Building
Web Quality
Web Semantic
Web Careers
Java Tutorials
Java Tutorial
JSP Tutorial
Servlets Tutorial
Struts Tutorial
EJB Tutorial
JMS Tutorial
JMX Tutorial
Programming Langauges
C Tutorial
C++ Tutorial
Visual Basic Tutorial
Data Structures Using C
Soft Skills
Communication Skills
Time Management
Project Management
Team Work
Leadership Skills
Corporate Communication
Negotiation Skills


Date and Time Functions
Previous Next


Date and Time Properties

When working with dates and times it is often necessary to know the current date and/or time and these values can be extracted from the server's system clock through the properties shown in the table below. These properties are used in several of the time and date functions described below.

Property Value
DateString Returns a String value representing the current date.
   DateString = 12-21-2006
Now Returns a Date value containing the current date and time.
   Now = 12/21/2006 5:20:00 AM
TimeOfDay Returns a Date value containing the current time of day (the date is set to 1/1/0001).
   TimeOfDay = 1/1/0001 5:20:00 AM
Timer Returns a Double value representing the number of seconds elapsed since midnight.
   Timer = 19200.1183166
TimeString Returns a String value representing the current time of day.
   TimeString = 05:20:00
Today Returns or sets a Date value containing the current date.
   Today = 12/21/2006 12:00:00 AM


Date Functions

In the following table,date functions are summarized with functions described more fully below.

Function Use
DateAdd() Returns a Date value containing a date and time value to which a specified time interval has been added.
DateDiff() Returns a Long value specifying the number of time intervals between two Date values.
DatePart() Returns an Integer value containing the specified component of a given Date value.
DateSerial() Returns a Date value representing a specified year, month, and day, with the time information set to midnight (00:00:00).
DateValue() Returns a Date value containing the date information represented by a string, with the time information set to midnight (00:00:00).
Day() Returns an Integer value from 1 through 31 representing the day of the month.
IsDate() Returns a Boolean value indicating whether an expression can be converted to a date.
Month() Returns an Integer value from 1 through 12 representing the month of the year.
MonthName() Returns a String value containing the name of the specified month.
WeekDay() Returns an Integer value containing a number representing the day of the week.



Time Functions

Time functions are summarized in the following table with functions described more fully below and several of the date functions can be applied to time measurements.

Function Use
DateAdd() Returns a Date value containing a date and time value to which a specified time interval has been added.
DateDiff() Returns a Long value specifying the number of time intervals between two Date values.
DatePart() Returns an Integer value containing the specified component of a given Date value.
Hour() Returns an Integer value from 0 through 23 representing the hour of the day.
Minute() Returns an Integer value from 0 through 59 representing the minute of the hour.
Second() Returns an Integer value from 0 through 59 representing the second of the minute.
TimeSerial() Returns a Date value representing a specified hour, minute, and second, with the date information set relative to January 1 of the year 1.
TimeValue() Returns a Date value containing the time information represented by a string, with the date information set to January 1 of the year 1.



Share And Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • connotea
  • del.icio.us
  • De.lirio.us
  • digg
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • NewsVine
  • Netvouz
  • RawSugar
  • Reddit
  • scuttle
  • Shadows
  • Simpy
  • Smarking
  • Spurl
  • TailRank
  • Wists
  • YahooMyWeb

Previous Next

Keywords: Date and Time Functions in VB.NET, sql server functions, vb net functions, visual basic functions, sql server date, vb net date, ms sql date, oracle functions, perl functions, php functions, javascript functions, asp functions, sql functions, php date, perl date, mysql functions, utc time, current time


HTML Quizes
HTML Quiz
XHTML Quiz
CSS Quiz
TCP/IP Quiz
XML Quizes
XML Quiz
XSL Quiz
XSLT Quiz
DTD Quiz
Schema Quiz
XForms Quiz
XSL-FO Quiz
XML DOM Quiz
XLink Quiz
XQuery Quiz
XPath Quiz
XPointer Quiz
RDF Quiz
SOAP Quiz
WSDL Quiz
RSS Quiz
WAP Quiz
Web Services Quiz
Browser Scripting Quizes
JavaScript Quiz
VBScript Quiz
AJAX Quiz
DHTML Quiz
HTML DOM Quiz
WMLScript Quiz
E4X Quiz
Server Scripting Quizes
ASP Quiz
PHP Quiz
PERL Quiz
SQL Quiz
ADO Quiz
.NET (dotnet) Quizes
Microsoft.Net Quiz
XML Web Services Quiz
ASP.Net Quiz
.Net Mobile Quiz
C# : C Sharp Quiz
ADO.NET Quiz
VB.NET Quiz
Multimedia Quizes
SVG Quiz
Flash Quiz
Media Quiz
SMIL Quiz
Web Building  Quizes
Web Browsers Quiz
Web Hosting Quiz
W3C Quiz
Web Building Quiz
Web Quality Quiz
Web Semantic Quiz
Web Careers Quiz
Java Quizes
Java Quiz
JSP Quiz
Servlets Quiz
Struts Quiz
EJB Quiz
JMS Quiz
JMX Quiz
Programming Langauges Quizes
C Quiz
C++ Quiz
Visual Basic Quiz
Data Structures Using C Quiz
Soft Skills Quizes
Communication Skills Quiz
Time Management Quiz
Project Management Quiz
Team Work Quiz
Leadership Skills Quiz
Corporate Communication Quiz
Negotiation Skills Quiz

Privacy Policy
Copyright © 2003-2008 Vyom Technosoft Pvt. Ltd., All Rights Reserved.