|
|
|
|
|
It's pretty easy to find, given a date, which day of the week that date fell on. It can be done with PHP and also with MySQL.
PHP
| <?php
//This will return the day of the week in a 3 letter textual format (i.e. Sun, Mon, etc...)
echo date("D",mktime());
//This will return the day of the week in full textual format (i.e. Sunday, Monday, etc...)
echo date("l",mktime());
//This will return the day of the week in numerical format (i.e. "0" Sunday to "6" Saturday)
echo date("l",mktime());
?> | |
For more details check the date function at :
http://www.weberdev.com/date
MySQL
| //This will return the day of the week in numerical format (i.e. "0" Monday to "6" Sunday)
SELECT WEEKDAY('2003-01-01');
//This will return the day of the week in numerical format (i.e. "1" Sunday to "7" Saturday)
SELECT DAYOFWEEK('2003-01-01'); | |
|
|
| List people whose birthdays fall on the current Day and Month
Categories : Databases, Date Time, MySQL, PHP | | | In Mysql, the 'datetime' data type is used to store date that looks like '2007-10-16 16:26:30'. we are going to design a function called mysqldate() that takes a mysql date and output format as input and outputs a well formated date. Categories : PHP, Date Time, Databases, MySQL | | | Data Retrieve from Mysql using AJAX with PHP Categories : PHP, AJAX, Date Time, Databases, MySQL | | | Count how many weeks in the month have a specified day, such as Mon, Tue, etc. Var avail - number of days - first day name of the month, occurrences of Sun, occurrences of Mon, etc. Allows you to calculate number of working hours exclude Holidays. Categories : Calendar, Date Time, PHP, Databases, MySQL | | | formating MySQL Timestamp to get a propper Output.
related : Timestamp, ereg_replace, mysql, substr Categories : MySQL, PHP, Date Time, Databases | | | bookmarker - PHP, PHPLIB, MySQL WWW based bookmark manager Categories : MySQL, PHP, MySQL, Complete Programs, Databases | | | How to Insert a Date Format Into MySQL from PHP Categories : PHP, Databases, MySQL, Date Time, Beginner Guides | | | Converting date formats to MySQL date format (yyyy-mm-dd) Categories : PHP, Databases, MySQL, Date Time | | | mysql date/time converters Categories : PHP, MySQL, Databases, Date Time | | | This program allows you to upload an ODBC ressource - i.e. an MS-Access database to a MySQL server. Categories : Databases, MySQL, Complete Programs, PHP, Databases | | | Checks Date-Input from HTML-Forms and converts to YYYY-MM-DD Format for MySQL Date-Fields Categories : MySQL, Date Time, PHP, Databases | | | Simple function to return the number of days in a time span between 2 given dates. Categories : PHP, Date Time, MySQL, Databases | | | Simple conversion functions to change MySQL dates to arrays, arrays to MySQL dates.
Categories : PHP, Arrays, Date Time, Databases, MySQL | | | Phorum, MySQL, Language, UK date format, MySQL UK Date format Categories : PHP, Date Time, Strings, MySQL, Databases | | | PHP Calendar Web App Categories : PHP, Databases, MySQL, Date Time, Calendar | |
| |
| |
|