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
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.
Which loop is used in case of arrays in the vbscript language?
How will you format a number in percetage format in vbscript?
How to create a function in vbscript?
How will you get the smallest subscript of an array in vbscript?
How many types of procedures are available in the vbscript language?
how to answer "TELL ME ABOUT UR SELF" as exp.person. whr to start and whr to stop. can anyone tel me
Explain the string concatenation function in vbscript?
How can constants be declared in the vbscript language?
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
what is inner join? what is outer join? what is a constraint? tell me about rdbms? tell me about acid properties?
How to write functions and sub in vb script?
what is resorceallocation
Which keyword is used to declare a variable in the vbscript language?
How to assign a date value to a variable?