MS Excel: DateSerial Function (VBA only)
------------------------------

In Excel, the *DateSerial* function returns a date given a year, month, and
day value.

The syntax for the *DateSerial* function is:

DateSerial( year, month, day )

*year* is a numeric value between 100 and 9999 that represents the year
value of the date.

*month* is a numeric value that represents the month value of the date.

*day* is a numeric value that represents the day value of the date.

Applies To:

   - Excel 2007, Excel 2003, Excel XP, Excel 2000


For example:

  DateSerial(2004, 6, 30) would return "6/30/2004" DateSerial(2004-1,
6, 30) would
return "6/30/2003" DateSerial(2004, 6-2, 14) would return "4/14/2004"


VBA Code

The *DateSerial* function can only be used in VBA code. For example:

Dim LDate As Date

LDate = DateSerial(2004, 5, 31)

In this example, the variable called LDate would now contain the value of
"5/31/2004".

-- 
Thanks & regards,
Noorain Ansari
 *http://excelmacroworld.blogspot.com/*<http://excelmacroworld.blogspot.com/>
*http://noorain-ansari.blogspot.com/* <http://noorain-ansari.blogspot.com/>

On Thu, Sep 15, 2011 at 7:27 PM, Shankar Bheema <shankar.n...@gmail.com>wrote:

> Pls explain the usage of Dateserial function ?  if possible provide me
> example
>
> --
>
> ----------------------------------------------------------------------------------
> Some important links for excel users:
> 1. Follow us on TWITTER for tips tricks and links :
> http://twitter.com/exceldailytip
> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
> 3. Excel tutorials at http://www.excel-macros.blogspot.com
> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
> To post to this group, send email to excel-macros@googlegroups.com
>
> <><><><><><><><><><><><><><><><><><><><><><>
> Like our page on facebook , Just follow below link
> http://www.facebook.com/discussexcel
>

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Reply via email to