what is the function to display current date?

Answer Posted / satya

You can use Date functions for this
ex-
1. Msgbox Date() or Msgbox Date
this will Returns the current system date.

2. MsgBox now() or MsgBox now
will Returns the current system date and Time.

3. MsgBox Time() or MsgBox Time
Returns - the current system time

Here is the list of All Date and Time Functions for
Reference.
Function -------> Description

CDate -Converts a valid date and time expression to the
variant of subtype Date
Date - Returns the current system date
DateAdd -Returns a date to which a specified time interval
has been added
DateDiff- Returns the number of intervals between two dates
DatePart- Returns the specified part of a given date
DateSerial- Returns the date for a specified year, month,
and day
DateValue - Returns a date
Day Returns- a number that represents the day of the month
(between 1 and 31, inclusive)
FormatDateTime - Returns an expression formatted as a date
or time
Hour - Returns a number that represents the hour of the day
(between 0 and 23, inclusive)
IsDate - Returns a Boolean value that indicates if the
evaluated expression can be converted to a date
Minute - Returns a number that represents the minute of the
hour (between 0 and 59, inclusive)
Month - Returns a number that represents the month of the
year (between 1 and 12, inclusive)
MonthName - Returns the name of a specified month
Now - Returns the current system date and time
Second - Returns a number that represents the second of the
minute (between 0 and 59, inclusive)
Time Returns - the current system time
Timer Returns - the number of seconds since 12:00 AM
TimeSerial - Returns the time for a specific hour, minute,
and second
TimeValue - Returns a time
Weekday - Returns a number that represents the day of the
week (between 1 and 7, inclusive)
WeekdayName - Returns the weekday name of a specified day
of the week
Year - Returns a number that represents the year

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to find the font in qtp. Scenario:After entering the username and passwd you will be navigate into the "welcome:Username" page.Now I want to extarct font for this message.

1833


Which loop is used in case of arrays in the vbscript language?

605


How will you format a number in percetage format in vbscript?

668


How to create a function in vbscript?

665


How will you get the smallest subscript of an array in vbscript?

948






How many types of procedures are available in the vbscript language?

613


how to answer "TELL ME ABOUT UR SELF" as exp.person. whr to start and whr to stop. can anyone tel me

1426


Explain the string concatenation function in vbscript?

612


How can constants be declared in the vbscript language?

647


i have a problem with this error(this error related edit and delete button,when i click this button in datagrid..i will get this error)"Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation." this is my code : <%@ Page Language="VB" Debug="false" %> <%@ import Namespace="Sytem.Data" %> <%@ import Namespace="System.Data.OleDB" %>

(Search Based On Staff I.C No) IC.No (XXXXXX-XX-XXXX)   ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> Total Leave Taken : Days

2412


what is inner join? what is outer join? what is a constraint? tell me about rdbms? tell me about acid properties?

1519


How to write functions and sub in vb script?

701


what is resorceallocation

1849


Which keyword is used to declare a variable in the vbscript language?

599


How to assign a date value to a variable?

677