<< previous page   --   table of contents   --   next page >>
| | | | | | | |
  • Return to Table of Contents
  • Table of Contents

    1. General Information
    2. MySQL Installation
    3. Tutorial Introduction
    4. Database Administration
    5. MySQL Optimisation
    6. MySQL Language Reference
    7. MySQL Table Types
    8. MySQL APIs
    9. Extending MySQL

    398 MySQL Technical Reference for Version 4.0.3   If  you  use ALTER TABLE to  widen  a  narrow TIMESTAMP column,  information  will  be displayed that previously was \hidden".   Similarly, narrowing a TIMESTAMP column does not cause information to be lost, except in the sense that less information is shown when the values are displayed.   Although TIMESTAMP values are stored to full precision, the only function that operates directly on the underlying stored value is UNIX_TIMESTAMP().  Other functions operate on the formatted retrieved value.  This means you cannot use functions such as HOUR() or SECOND() unless the relevant part of the TIMESTAMP value is included in the formatted value.   For example,  the  HH  part of a  TIMESTAMP  column is not displayed unless the display size is at least 10, so trying to use HOUR() on shorter TIMESTAMP values produces a meaningless result. You can to some extent assign values of one date type to an object of a di erent date type. However, there may be some alteration of the value or loss of information:   If you assign a DATE value to a DATETIME or TIMESTAMP object, the time part of the resulting value is set to '00:00:00', because the DATE value contains no time informa- tion.   If you assign a DATETIME or TIMESTAMP value to a DATE object, the time part of the resulting value is deleted, because the DATE type stores no time information.   Remember that although DATETIMEDATE, and TIMESTAMP values all can be speci ed using the same set of formats, the types do not all have the same range of values.  For example, TIMESTAMP values cannot be earlier than 1970 or later than 2037.  This means that a date such as '1968-01-01', while legal as a DATETIME or DATE value, is not a valid TIMESTAMP value and will be converted to 0 if assigned to such an object. Be aware of certain pitfalls when specifying date values:   The relaxed format allowed for values speci ed as strings can be deceiving. For example, a value such as '10:11:12' might look like a time value because of the `:' delimiter, but if used in a date context will be interpreted as the year '2010-11-12'.  The value '10:45:15' will be converted to '0000-00-00' because '45' is not a legal month.   The MySQL server only performs basic checking on the validity of a date:  days 00-31, months 00-12, years 1000-9999.  Any date not within this range will revert to 0000- 00-00.  Please note that this still allows you to store invalid dates such as 2002-04-31. It  allows  web  applications  to  store  data  from  a  form  without  further  checking.   To ensure a date is valid, perform a check in your application.   Year  values  speci ed  as  two  digits  are  ambiguous,  because  the  century  is  unknown. MySQL interprets 2-digit year values using the following rules: Year values in the range 00-69 are converted to 2000-2069. Year values in the range 70-99 are converted to 1970-1999. 6.2.2.3  The TIME Type MySQL retrieves and displays TIME values in 'HH:MM:SS' format (or 'HHH:MM:SS' format for large hours values).  TIME values may range from '-838:59:59' to '838:59:59'.  The
     

    Customer Support CentreMySQL Reference Manual

    Web Hosting Services
    UNIX WEB HOSTING
    SUPPORT & FAQ's
    TERMS OF USE
    Domain Services
    DOMAIN REGISTRATION
    MANAGE YOUR ACCOUNT
    SUPPORT & FAQ's
    TERMS OF USE
    SITE MAP
    Home
    Hosting Plans | Domain Registration | About Us | Contact Us | Site Map
    Terms of Use | Privacy Policy | Guarantees
    Merchant Accounts

    SpiritHost - web hosting for spiritual and education sites
    SpiritHit.com - Religious and Spiritual Portal
  • Return to Table of Contents
  • Back to top

  • Web Hosting: Manuals & FAQ's

    1. Unix-Based Web Hosting
    2. Unix Dedicated Servers
    3. Windows Dedicated Servers
    4. CuteFTP User’s Guide
    5. CuteHTML User’s Guide
    6. WS_FTP Pro User's Guide
    7. Miva Order User's Guide
    8. Miva Merchant User's Guide