About 4,490,000 results
Open links in new tab
  1. Truncate (not round) decimal places in SQL Server

    I'm trying to determine the best way to truncate or drop extra decimal places in SQL without rounding. For example: declare @value decimal(18,2) set @value = 123.456 This will …

  2. Oracle date function for the previous month - Stack Overflow

    However, it is a very simple matter to fix by using the plus operator to add 1 in order to get the beginning of the first day of the next month, like so: …

  3. How to truncate string using SQL server - Stack Overflow

    i have large string in SQL Server. I want to truncate that string to 10 or 15 character Original string

  4. How to get first and last day of week in Oracle? - Stack Overflow

    I need to get the first day and the last day of the week from some strings that have the format like this: '201118' where 2011 is the year and 18 is the number of the week. Knowing the number of...

  5. Compare date only (without time) in JPA2 (JPQL) - Stack Overflow

    In Hibernate 6 and above, you can use date_trunc(text, timestamp) to truncate the timestamp more precisely, for example: date_trunc('hour', timestamp) to truncate the timestamp up to the …

  6. How can I truncate a datetime in SQL Server? - Stack Overflow

    May 28, 2009 · CREATE FUNCTION trunc_date(@date DATETIME) RETURNS DATETIME AS BEGIN SELECT CONVERT(varchar, @date,112) END Third, the more verbose method. This …

  7. Truncate number to two decimal places without rounding

    number = Math.trunc(number*100)/100 I used 100 because you want to truncate to the second digit, but a more flexible solution would be :

  8. python - How to convert date to the first day of month in a …

    Notice how the trunc function takes the column argument first and the date_trunc takes the column argument second. The trunc method is poorly named - it's part of the functions …

  9. How do I truncate a PySpark dataframe of timestamp type to the …

    31 You use wrong function. trunc supports only a few formats: Returns date truncated to the unit specified by the format. :param format: 'year', 'yyyy', 'yy' or 'month', 'mon', 'mm' Use date_trunc …

  10. I need to get month and year from dateColumn - Stack Overflow

    2 You ae mixing Oracle syntax with Postgres (date_trunc()) and SQL Server (convert()). Many date functions are vendor-specific, so you learn the relevant syntax for your database. In …