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

filter the array values without using filter function?

1653


how to comvert 120 into one hunderd twenty rupees only and vice varsa

1800


Sub link() Dim k As Integer Dim rand As Integer Dim URL As String Dim foldernum As Integer Dim folderstring As String Dim filenum As Integer Dim filestring As String k = 1 'for AC Numbers For i = 11 To 40 foldernum = 0 foldernum = 1000 + i folderstring = CStr(foldernum) folderstring = Mid(folderstring, 2, 3) folder = "ac" & folderstring 'folderstring = Sheets(2).Cells(i, 1) ' for Number of Random files For j = 1 To 10 rand = Int(Rnd * (200 - 1) + 1) filenum = 0 filenum = 1000 + rand filestring = CStr(filenum) filestring = Mid(filestring, 2, 3) 'URL = "http://ceobihar.nic.in/PSCDROM/ac" & folderstring & "/i" & folderstring & "0" & filestring & ".pdf" URL = "http://www.elections.tn.gov.in/pdfs/dt1/" & folder & "/" & folder & filestring & ".pdf" ' URL =http://www.wb.nic.in/wbeco/EROLLS/PDF/English/A001/a0010105 .pdf Cells(k, 1) = folderstring Cells(k, 2) = folder Cells(k, 3) = filestring Cells(k, 3) = URL k = k + 1 Next j Next i End Sub plz define it

2233


What is the extension of the vbscript file?

549


How to pass argument by reference to a function in vbscript?

536






Explain about the functionality of vb script?

567


who will create the object?

1481


How to open excel in vb script?

568


Which operator is used to perform the comparison among 2 operands in the vbscript language?

524


Write a test case using Test if the images,a particular test exists,check if the page links match,page response is within a certain range,parameterization of the test,the test should comprise of actions,the test should use a custom function,the test should use global repository

1788


Which function is used to perform string comparison?

559


What is dictionary object in vbscript? Explain?

623


How to open a file. What is the perpose of true and false mode there?

605


What is vbscript language used for and which earlier language is it modeled upon?

529


1.I want to establish connection with excel and also want to fetch the data using SQL queries. 2.the code should be written in such a way that in future if I want to migrate from excel to MS excess database , then there should be minimal changes.

1514