in Education by
SELECT GETDATE() Returns: 2008-09-22 15:24:13.790 I want that date part without the time part: 2008-09-22 00:00:00.000 How can I get that? JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
SELECT DATEADD(dd, 0, DATEDIFF(dd, 0, @your_date)) for example SELECT DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE())) gives me 2008-09-22 00:00:00.000 Pros: No varchar<->datetime conversions required No need to think about locale

Related questions

0 votes
    SELECT GETDATE() Returns: 2008-09-22 15:24:13.790 I want that date part without the time part: 2008-09-22 00: ... How can I get that? Select the correct answer from above options...
asked Jan 28, 2022 in Education by JackTerrance
0 votes
    I am using Classic ASP and have the following VB script code From8to14 = date-14 To8to14 = date-8 This sets the two ... "& Day(From8to14) &"' " & _ "AND INTRAY.DateMatched...
asked Jul 6, 2022 in Education by JackTerrance
0 votes
    How will you add 10 years to current date using local datetime api of java8 in Java8?...
asked Nov 8, 2020 in Education by Editorial Staff
0 votes
    How will you add 1 year to current date using local datetime api of java8 in Java8?...
asked Nov 8, 2020 in Education by Editorial Staff
0 votes
    How will you add 1 month to current date using local datetime api of java8 in Java8?...
asked Nov 8, 2020 in Education by Editorial Staff
0 votes
    How will you add 1 week to current date using local datetime api of java8 in Java8?...
asked Nov 8, 2020 in Education by Editorial Staff
0 votes
    How will you get the current date using local datetime api of java8 in Java8?...
asked Nov 8, 2020 in Education by Editorial Staff
0 votes
    How do I parse a string eg. "01/21 - 02/20" which is represented as month/day to month/day. ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 14, 2022 in Education by JackTerrance
0 votes
    How do I parse a string eg. "01/21 - 02/20" which is represented as month/day to month/day. ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 18, 2022 in Education by JackTerrance
0 votes
    Lets say I have this following table: +------+-------------------------+-- ... JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 2, 2022 in Education by JackTerrance
0 votes
    Is there a built-in method for converting a date to a datetime in Python, for example getting the datetime for the ... .month, d.day)? Select the correct answer from above options...
asked Feb 4, 2022 in Education by JackTerrance
0 votes
    I have a table in which data is been logged in 'yy/MM/dd HH:mm:ss' format and my regional ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 8, 2022 in Education by JackTerrance
0 votes
    I'm building an application with C# code. How do I get only the date value from a DateTimePicker ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 7, 2022 in Education by JackTerrance
0 votes
    i've got columns with year, month and day. how can i put together in SQL? SELECT DATA, year(data ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jan 16, 2022 in Education by JackTerrance
0 votes
    To get the current date, the _______ function will return a Date object which can be converted to a different ... of R Programming Select the correct answer from above options...
asked Feb 16, 2022 in Education by JackTerrance
...