Sign inTry Free
  • Introduction
    • Deploy
      • Connect to Your Cluster
        • Create a Database
          • Integrate with SingleStoreDB
            • Load Data
              • Query Data
                • Manage Data
                  • Developer Resources
                    • User and Cluster Administration
                      • Reference
                        • Configuration Reference
                          • SingleStoreDB Operator Reference
                            • MemSQL Ops CLI Reference
                              • SingleStore Tools Reference
                                • SQL Reference
                                  • SQL Command Syntax
                                  • SQL Commands List
                                  • SQL Functions List
                                  • Comparison Operators and Functions
                                    • Database Object Case-Sensitivity
                                    • Data Types
                                      • Operations that Take Either a Database or a Cluster Level Lock
                                        • User-Defined Variables
                                          • Restricted Keywords
                                            • Aggregate Functions
                                              • Cluster Management Commands
                                                • Code Generation Functions
                                                  • Conditional Functions
                                                    • Data Definition Language DDL
                                                      • Data Manipulation Language DML
                                                        • Date and Time Functions
                                                          • ADDTIME
                                                          • CONVERT_TZ
                                                          • CURRENT_DATE And CURDATE
                                                          • CURRENT_TIME And CURTIME
                                                          • CURRENT_TIMESTAMP
                                                          • DATE
                                                          • DATEDIFF
                                                          • DATE_ADD
                                                          • DATE_FORMAT
                                                          • DATE_SUB
                                                          • DATE_TRUNC
                                                          • DAY
                                                          • DAYNAME
                                                          • DAYOFWEEK
                                                          • DAYOFYEAR
                                                          • EXTRACT
                                                          • FROM_DAYS
                                                          • FROM_UNIXTIME
                                                          • GET_FORMAT
                                                          • HOUR
                                                          • LAST_DAY
                                                          • LOCALTIMESTAMP
                                                          • MICROSECOND
                                                          • MINUTE
                                                          • MONTH
                                                          • MONTHNAME
                                                          • MONTHS_BETWEEN
                                                          • NOW
                                                          • QUARTER
                                                          • SECOND
                                                          • SEC_TO_TIME
                                                          • STR_TO_DATE
                                                          • TIME
                                                          • TIMEDIFF
                                                          • TIMESTAMP
                                                          • TIMESTAMPADD
                                                          • TIMESTAMPDIFF
                                                          • TIME_FORMAT
                                                          • TIME_TO_SEC
                                                          • TO_CHAR
                                                          • TO_DATE
                                                          • TO_DAYS
                                                          • TO_SECONDS
                                                          • TO_TIMESTAMP
                                                          • TRUNC
                                                          • UNIX_TIMESTAMP
                                                          • UTC_DATE
                                                          • UTC_TIME
                                                          • UTC_TIMESTAMP
                                                          • WEEK
                                                          • WEEKDAY
                                                          • YEAR
                                                        • Distinct Count Estimation Functions
                                                          • Full-Text Search Functions
                                                            • Geospatial Functions
                                                              • Information Functions
                                                                • JSON Functions
                                                                  • Numeric Functions
                                                                    • Operational Commands
                                                                      • Pipelines Commands
                                                                        • Procedural SQL Reference
                                                                          • Regular Expression Functions
                                                                            • Resource Pool Commands
                                                                              • Security Management Commands
                                                                                • SHOW Commands
                                                                                  • String Functions
                                                                                    • Time Series Functions
                                                                                      • Vector Functions
                                                                                        • Window Functions
                                                                                        • Troubleshooting Reference
                                                                                          • System Databases
                                                                                          • Information Schema Reference
                                                                                          • Security
                                                                                            • Release Notes
                                                                                              • Support
                                                                                                • Glossary
                                                                                                1. Self-Managed v7.3
                                                                                                2. /
                                                                                                3. ...
                                                                                                4. /
                                                                                                5. Date and Time Functions

                                                                                                Date and Time Functions

                                                                                                In this section

                                                                                                • ADDTIME
                                                                                                • CONVERT_TZ
                                                                                                • CURRENT_DATE And CURDATE
                                                                                                • CURRENT_TIME And CURTIME
                                                                                                • CURRENT_TIMESTAMP
                                                                                                • DATE
                                                                                                • DATEDIFF
                                                                                                • DATE_ADD
                                                                                                • DATE_FORMAT
                                                                                                • DATE_SUB
                                                                                                • DATE_TRUNC
                                                                                                • DAY
                                                                                                • DAYNAME
                                                                                                • DAYOFWEEK
                                                                                                • DAYOFYEAR
                                                                                                • EXTRACT
                                                                                                • FROM_DAYS
                                                                                                • FROM_UNIXTIME
                                                                                                • GET_FORMAT
                                                                                                • HOUR
                                                                                                • LAST_DAY
                                                                                                • LOCALTIMESTAMP
                                                                                                • MICROSECOND
                                                                                                • MINUTE
                                                                                                • MONTH
                                                                                                • MONTHNAME
                                                                                                • MONTHS_BETWEEN
                                                                                                • NOW
                                                                                                • QUARTER
                                                                                                • SECOND
                                                                                                • SEC_TO_TIME
                                                                                                • STR_TO_DATE
                                                                                                • TIME
                                                                                                • TIMEDIFF
                                                                                                • TIMESTAMP
                                                                                                • TIMESTAMPADD
                                                                                                • TIMESTAMPDIFF
                                                                                                • TIME_FORMAT
                                                                                                • TIME_TO_SEC
                                                                                                • TO_CHAR
                                                                                                • TO_DATE
                                                                                                • TO_DAYS
                                                                                                • TO_SECONDS
                                                                                                • TO_TIMESTAMP
                                                                                                • TRUNC
                                                                                                • UNIX_TIMESTAMP
                                                                                                • UTC_DATE
                                                                                                • UTC_TIME
                                                                                                • UTC_TIMESTAMP
                                                                                                • WEEK
                                                                                                • WEEKDAY
                                                                                                • YEAR

                                                                                                Last modified: November 17, 2022

                                                                                                Was this article helpful?

                                                                                                USE
                                                                                                ADDTIME

                                                                                                Product

                                                                                                • Product Overview
                                                                                                • Solutions
                                                                                                • Pricing
                                                                                                • Support

                                                                                                Community

                                                                                                • Forums
                                                                                                • Developer Hub
                                                                                                • Events
                                                                                                • Training

                                                                                                Company

                                                                                                • Contact Us
                                                                                                • Blog
                                                                                                • Careers
                                                                                                • SingleStore Connect

                                                                                                This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

                                                                                                • © SingleStore
                                                                                                • |

                                                                                                • Privacy Policy
                                                                                                • |

                                                                                                • Terms of Service
                                                                                                • |

                                                                                                • Legal Terms and Conditions

                                                                                                Was this article helpful?