About 397 results
Open links in new tab
  1. Date Functions in SQL Server and MySQL - W3Schools

    SQL Date Data Types. MySQL comes with the following data types for storing a date or a date/time value in the database: DATE - format YYYY-MM-DD; DATETIME - format: YYYY-MM-DD HH:MI:SS; TIMESTAMP - format: YYYY-MM-DD HH:MI:SS; YEAR - format YYYY or YY; SQL Server comes with the following data types for storing a date or a date/time value in the ...

  2. SQL SELECT WHERE with date and time - Stack Overflow

    Dec 11, 2011 · for a 24 hour window, you just need to have 2 clauses. If you want more than a 24 hour window, you'll need three clauses, one for the start date, one for the end date and one for all the dates in between: or ( date = '2011-12-13' AND time < '23:00:00' ) or (date >='2011-12-12' and date < '2011-12-13')

  3. SQL Date and Time (With Examples) - Programiz

    In SQL, there are different data types to help us work with dates and times. In this tutorial, you will learn about date and time data types in SQL with the help of examples.

  4. sql server - Simple DateTime sql query - Stack Overflow

    May 25, 2011 · How do I query DateTime database field within a certain range? I am using SQL SERVER 2005. Error code below. FROM TABLENAME . WHERE DateTime >= 12/04/2011 12:00:00 AM . AND DateTime <= 25/05/2011 3:53:04 AM. Note that I need to get rows within a certain time range. Example, 10 mins time range. Currently SQL …

  5. How do I write a SQL query for a specific date range and date time ...

    Aug 2, 2019 · The only safe formats for datetime literals in SQL Server (or at least historically) are: "YYYYMMDD", "YYYY-MM-DD'T'hh:mm:ss" and "YYYY-MM-D'T'hh:mm:ss:mil" (where 'T' is the literal letter T). All other formats are subject to culture issues. Infact this worked for me. SELECT * . FROM myTable.

  6. SQL Server: Query Date and Time with Datetime Select - PopSQL

    Learn how to query and manipulate date and time data in SQL Server using datetime and timestamp values. Discover how to retrieve the current date and time, filter records between specific dates or timestamps, extract parts of a timestamp, find the day of the week, and convert timestamps to Unix timestamps for easier comparison and calculation.

  7. SQL Server Date and Time Functions with Examples

    Dec 31, 2024 · Learn SQL Server date and time functions SYSDATETIME, SYSDATETIMEOFFSET, SYSUTCDATETIME, CURRENT_TIMESTAMP, GETDATE (), DATENAME, DATEPART with examples.

  8. MySQL Date and Time Functions - GeeksforGeeks

    Apr 15, 2025 · MySQL provides a variety of date and time functions that help users work with date values, perform calculations, and format them as needed. These functions allow developers to perform calculations, extract specific parts of a date, or …

  9. Mastering Date and Time Manipulation in SQL: A Comprehensive …

    Aug 28, 2023 · SQL (Structured Query Language) provides a range of powerful functions and techniques to work with dates and times effectively. In this guide, we’ll explore the essential concepts and...

  10. Date and time data types and functions (Transact-SQL)

    Aug 8, 2024 · The sections in this article cover all Transact-SQL date and time data types and functions. The Transact-SQL date and time data types are listed in the following table: Note. The Transact-SQL rowversion data type isn't a date or time data type. timestamp is a deprecated synonym for rowversion.