Date et fonctions de temps |
 |
 |
Date et propri�t�s de Temps
|
En travaillant avec des dates et des p�riodes il est souvent n�cessaire de conna�tre la date du jour et/ou de la chronom�trer et ces valeurs peuvent �tre extraites � partir de l'horloge du syst�me du serveur par les propri�t�s montr�es dans la table ci-dessous. Ces propri�t�s sont employ�es dans plusieurs des fonctions d'heure et de date d�crites ci-dessous.
|
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 |
|
Fonctions de date
|
Dans la table suivante, des fonctions de date sont r�capitul�es avec des fonctions ont expos� plus enti�rement dans ce qui suit.
|
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. |
|
Fonctions de temps
|
Des fonctions de temps sont r�capitul�es dans la table suivante avec des fonctions ont expos� plus enti�rement dans ce qui suit et plusieurs des fonctions de date peuvent �tre appliqu�es aux mesures de temps.
|
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. |
|
 |
 |
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
|