Add the week day to a field |
4/20/2007 4:03:47 AM |
PHPRunner General questions | |
N
Norian author
Hello I have a requirement to add date, time and the weekday automatically to record, now I have the date & time sorted out, but cannot figure out how to add the day automatically i.e. field day want it to automatically put the day of the week in when the record is being added. |
|
N
|
Norian author 4/20/2007 |
Hmm maybe I did not explain this very well or maybe people think its too simple <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=17156&image=1&table=forumreplies' class='bbc_emoticon' alt=':blink:' /> |
T
|
thesofa 4/21/2007 |
Do you really need to do this as there are PHP functions which will extract the day iof the week from any date. |
N
|
Norian author 4/22/2007 |
Do you really need to do this as there are PHP functions which will extract the day iof the week from any date. Have a look on W3 Schools here for info about using the date() function. using date(D) will extract the day of the week from a date. HTH
|
N
|
Norian author 4/22/2007 |
Got it working now thanks, for some reason date("D") was just leaving the field blank, I deleted the field from the database and recreated it and now its working fine... So it was nice and simple in the end <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=17171&image=1&table=forumreplies' class='bbc_emoticon' alt=':D' /> |