About 27,900,000 results
Open links in new tab
  1. How to get Time from DateTime format in SQL? - Stack Overflow

    Feb 9, 2011 · I want to get only Time from DateTime column using SQL query using SQL Server 2005 and 2008 Default output:

  2. sql - How to cast the DateTime to Time - Stack Overflow

    Mar 19, 2015 · In this article published in 2000 the writer explains in depth how SQL Server treats dates and times. I doubt if anything significant changed between 2000 and 2015 in the way SQL Server …

  3. SQL-Server Time data type - Stack Overflow

    Dec 10, 2015 · From what i've read so far, the data type time in sql server (starting with 2008) should be able to store the time in a HH:MM format. Then I tried this myself with the following simple exercise: c...

  4. database - how to get current datetime in SQL? - Stack Overflow

    Aug 5, 2009 · Want to get current datetime to insert into lastModifiedTime column. I am using MySQL database. My questions are: is there a function available in SQL? or it is implementation depended …

  5. Format Time in SQL Server? - Stack Overflow

    Dec 13, 2022 · The value of time or datetime data type is not stored with format in sql server. If you want to see the time in a different format you can manipulate the way that time and datetime data types …

  6. sql - Set time portion of a datetime variable - Stack Overflow

    DECLARE @start_date DATETIME DECLARE @end_date DATETIME SET @start_date = DATEADD(DAY, -2, GETDATE()) SET @end_date = DATEADD(DAY, -1, GETDATE()) For an …

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

    AND (date <= '2011-12-12' AND time < '23:00:00') The EXPLAIN plan for either situation should result in a fast execution of the query with the use of the date_time index.

  8. Getting current system time in SQL Server - Stack Overflow

    Mar 15, 2012 · SYSDATETIMEOFFSET() to get the current local time including the timezone offset as DATETIMEOFFSET data type (new to SQL Server 2008) SQL Server 2008 also offers …

  9. How to select date without time in SQL - Stack Overflow

    Feb 26, 2011 · When I select date in SQL it is returned as 2011-02-25 21:17:33.933. But I need only the Date part, that is 2011-02-25. How can I do this?

  10. How to add time to DateTime in SQL - Stack Overflow

    Jul 3, 2013 · I'm trying to add custom time to datetime in SQL Server 2008 R2. Following is what I've tried.