hi,

i got one date which get it from database, see the below how i can the date.

$SQL = "select to_char(dateField,'dd-mm-yyyy') as dateField1 from table1"

so the dateField1 is 27-10-2003

now how can i can the weekday of this date?

i try to do like below:
$strDayOfDate = to_char(dateField1, 'D');

but i think something wrong with it.

anybody please help me.....

thanks.

    ok i find out how to do it.... use the command getDate and wday. do like below....

    $strTempDate = getDate($strRunDate);
    $strDayOfRun = $strTempDate['wday'];

    0= sunday
    1= monday
    .......
    6= saturday

      Originally posted by likchin
      i try to do like below:
      $strDayOfDate = to_char(dateField1, 'D');

      Hi,
      it's ok, but only if you do a function called to_char!

      The rigth function is date(), but it return a number. So it's usefull a to_char() function to convert the number into a char.

      Me, I use an array...

        Write a Reply...