Algorithms Arrays Passwords Uncategorized
Commerce Uncategorized
Databases Abstraction Layers Informix LDAP MS SQL MySQL ODBC PostgreSQL Uncategorized
Date & Time Calculators Conversion Translation Uncategorized
Discussion Chat Forums Guestbooks Polls Uncategorized
Email Validation Uncategorized
External Uncategorized
Files and Directories Uncategorized
Games Uncategorized
Graphics 3-D Graphs Resizing Thumbnails Uncategorized
HTML Forms Menus & Navigation Source Viewers Tables Templates Uncategorized
HTTP Authentication Cookies File Uploading Uncategorized
I18N Uncategorized
Math Uncategorized
Miscellaneous Uncategorized
Searching and Trees Uncategorized
Security Uncategorized
Text Uncategorized
Utilities Calendars Counters Link Checkers Weather Uncategorized
XML Uncategorized
| php sample source codes |
|---|
|
While building an agenda for my own purposes I had the need for the conversion of human date format (e.g. 3-08-02 or 3.3.2002) to a database-sortable format like 20020808. Attached you will find two functions; form_to_db() and db_to_form() who will do this job for you.
|
|
When changing from money numbers to words (as in writing out a cheque). I am not the original author, but this is valuable, so I include it here.
|
|
this code is orginaly coding by 'petermac'
But i add Cents to this code
|
|
<p>Here are <b>two simple functions</b> that convert a given amount of seconds into <b>REAL</b> "human-readable" formats (i.e. 320 secs = '05 mins, 20 secs' OR '00:05:20') </p>
<p>
These can help in effectively printing database records (or anything for that matter) returned in seconds only.</p>
|
|
This function is used when your have Overseas server, let's say your server is on GMT-7 and your Local time is on GMT +7, then you want your script time to use your Local (GMT+7) time.
|
|
Use this function to convert a mysql datetime field from the YYYY-MM-DD 00:00:00 format to the Seconds since Epoch and vise versa. Returns seconds since epoch and the datetime
|
|
Five tons of flax
|
|
Added in RFC822 valid date format, suitable for RSS feeds.
|
|
Converts a user-entered date field into standard MySQL format. Also checks that the date entered is a valid date. Accepts mm/dd/yyyy, mm-dd-yyyy, yyyy/mm/dd, and yyyy-mm-dd formats.
|
|
New and Improved! New function mysql_cvdate allows you to take a form-entered date value and express it in mysql's SQL date format.
Also includes some real-life functions you can call to perform common date/time conversions between MySQL datetime format, MySQL timestamp format and UNIX timestamp (i.e. seconds after epoch) with "human" output.
Time left function perfect for auction scripts, or where you need output of the difference between two supplied times.
|
|
Someone wanted to have a converter that took a "human" time and converted it to a MySQL timestamp. Use the function cvdate() to convert to a UNIX time stamp, then use timestamp_to_mysql() (fount in the original mysql date/time converters article) to get the MySQL timestamp value. (Also check out strtotime() for a good english to timestamp converter!)
|
|
Someone wanted to have a converter that took a "human" time and converted it to a MySQL timestamp. Use the function cvdate() to convert to a UNIX time stamp, then use timestamp_to_mysql() (fount in the original mysql date/time converters article) to get the MySQL timestamp value. (Also check out strtotime() for a good english to timestamp converter!)
|
|
This is the Easy way to Show a Dynamic Thai or English date on web page with user friendly styles such as
"dd-mm-yyy" which will show Monday 13 August 2001.
It's flexible for define any syntax which you want . Try a syntax like "dd-mm-yyyy","help" to see inline usages.
|
|
I replaced the old code snippet with this simple class. This class (my first one, only for testing) is more flexible and can be used for date calculations. You need to translate the week-days and month names in your local language. This is the last release because some simple PHP functions do the same job.
|
|
Generates a fully-compliant RFC 822 date string, including correct timezone offset.
|
|
This code converts int seconds to a nice Hours:Minutes:Seconds output
|
|
Convert server time to local time just use if your sever have different time with your place, sample you live in indonesia like me and your server is on US.
|
|
Takes a MySQL formated timestamp value (YYYYMMDDhhmmss) and converts it to a humman readable date using the date() function.
|
|
This is just like PHP's date() function, except it observes the user's time settings. Very useful if you want to have times customized for your users, depending on what timezone they are in and whether they are observing DST/Summer Time.
|