DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  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
    >



Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links