Working with data 15
The _format() function use a special string of text to format the date. Any letter preceded by
a percent sign will be replaced with some value based on the date. In this example, %W
becomes the day of the week, %M becomes the full month name, %D becomes the day of
the month with suffix, and %Y is the four digit year. There are many such codes, and any
good book on MySQL will give you the full table. Here are a few samples:
Code
Replacement
%S
second, two digits
%i
minute, two digits
%l
hour
%p
AM or PM
%W
weekday name
%a
weekday name, abbreviated
%e
day of the month
%D
day of the month, with English suffix
%M
month name
%b
month name, abbreviated
%c
month number
%Y
year
%%
a percent sign
Backup Data
You must backup your data regularly. You should perform a backup as often as you change
data. In CocoaMySQL, this is performed from the Export menu item under the File menu.
On the command line, you can do the same with: