Date Conversion Urgent

Results 1 to 2 of 2

Thread: Date Conversion Urgent

  1. #1
    wini Guest

    Default Date Conversion Urgent

    What is date function in java script which can be used to convert a text field into a date field<BR>

  2. #2
    Tummala Guest

    Default RE: Date Conversion Urgent

    see the 7th line...i think that is the answer<BR>/*<BR> Given a date as a string, return the day of the week<BR> as an integer between 1 and 7. Note Sunday = 1.<BR>*/<BR>function dayofweek( datestr ) {<BR> var dati;<BR> dati = new Date( datestr ); // make datestr into a Date <BR> instance<BR> return( 1 + dati.getDay() ); // get the day of the week <BR> and add 1<BR>} // since getDay() returns a number between 0 and 6<BR>/*<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts