Convert To Date in Javascript


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Convert To Date in Javascript

  1. #1
    Paul Guest

    Convert To Date in Javascript


    Hi,

    Does anyone knows how to convert a text box value to a short date value (mm/dd/yy)in
    Javascript ??? (like in asp/vbscript cdate did the work)

    thx in advance

    Paul
    web site : www.namtek.ca


  2. #2
    Lisa Guest

    Re: Convert To Date in Javascript


    Paul
    if you need a date data type try:

    var oDate = new Date() // new date object
    oDate.getDate( "01/01/2001") //set date

    if its formatting you need - check out all the date functions available
    with this object

    the following site contains a nice date formatting routine

    http://developer.irt.org/script/1.htm




    "Paul" <paul@namtek.ca> wrote:
    >
    >Hi,
    >
    >Does anyone knows how to convert a text box value to a short date value

    (mm/dd/yy)in
    >Javascript ??? (like in asp/vbscript cdate did the work)
    >
    >thx in advance
    >
    >Paul
    >web site : www.namtek.ca
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center