Questions tagged [to-char]

The TO_CHAR function converts another data type (e.g. NUMBER, DATE) to a text. Use for questions about the use of this function.

The TO_CHAR function converts another data type (e.g. NUMBER, DATE) to text. It is usually used to format output data.


Sources:

215 questions
-2
votes
1 answer

To Convert date column into 'dd/mm/yyyy' format without using to_char function

while selecting a date column in oracle, I want to Convert that date column into dd/mm/yyyy with out using a to_char function. Please suggest is there any way to get the required output. My Date Format is DD-MMM-YY and I want to convert into…
-2
votes
2 answers

extract month in sql query

Which MONTH (i.e. JAN or FEB, or JUN, etc…) in the hiring date of all employees across all departments can be found in all three departments in the employees table (dept 50, 60, 80)? Hint: the month of JANUARY is a month where employees were hired…
Liana
  • 7
  • 1
  • 3
-3
votes
1 answer

Error casting datatypes in sql server

I'm hitting error while running this statement in sql server.. DECIMAL(TO_CHAR(CURRENT TIMESTAMP -1 DAYS,'yyyymmdd')8,0)
Gyan05
  • 15
  • 2
-4
votes
3 answers

GROUP BY WITH TO_CHAR FUNCTION

SELECT TO_CHAR(order_date, 'YYYY-MM'), product_id, SUM(quantity) sum_quan, ROW_NUMBER() OVER ( ORDER BY order_date) RN FROM customer_orders WHERE 1 = 1 AND product_id = 2 AND To_char(order_date, 'YYYY-MM') BETWEEN…
-8
votes
1 answer

'to_char' is not a recognized built-in function name

(to_char(sysdate,'YYYY')+least(sign((sysdate-to_date('01-Aug-'|| to_char(sysdate,'YYYY'),'DD-Mon-RRRR'))),0)) "AcYear" Error: 'to_char' is not a recognized built-in function name. I tried changing to_char and to_date to CONVERT but getting…
Aruna Raghunam
  • 903
  • 7
  • 22
  • 43
1 2 3
14
15