what is the function to display current date?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / ranjan garg
document.write("The current system date is: ")
document.write(Date)
| Is This Answer Correct ? | 1 Yes | 4 No |
Explain How do you create a recordset object in vbscript?
accept an email id & validate it .email id should not exceed 25 characters the mail id should contain 3 characters excluding domain name,@ and .(dot) the last 3 characters of the domain should be net,com or org
Which date function is used in the vbscript language to find the difference between the 2 dates?
how to write function to validate the number of characters entering into the text box?
how to delete folder test3,test4 and test5 using vbscript?
a function that takes an integer array as an argument and returns the largest value in the array. Use the function in a program
Can u describe what kind of testing are for OTC derivates by banks.
HI how can handle dynamic image through vb script example we have to create email id fill the edit box(these latters change wrong password) i am wating your answer
Write a function for Instr(). We need to write a function that works as same as Instr(). Code or Even pseudo code is good enough for me.?
who will create the object?
How can you destroy an object in vbscript?
i need to login to my yahoo accoutnt using VB Script, automating the operation of webobjects, even launching of IE. How?