Loading topic
TO_CHAR, TO_DATE, TO_NUMBER, and the fo7 min readSELECT queries, know the NUMBER, VARCHAR2, and DATE types, and can run SQL in SQL*Plus or SQL Developer. The examples use DUAL and assume an English-language session unless stated.4 min readTO_CHAR turns a DATE into text. It assumes you can write basic SELECT queries, know the DATE and VARCHAR2 types, and know what DUAL is. It also assumes you have read the chapter on format models. A format model is the pattern string, such as 'YYYY-MM-DD', that t7 min readTO_CHAR with a NUMBER as its first argument. It assumes you know basic SELECT syntax, the NUMBER and VARCHAR2 types, and the DUAL table. It also assumes you have seen format models in the previous chapters, including how the FM modifier works for dates.5 min readTO_CHAR with a date or number format model, as covered in the earlier chapters on formatting dates and numbers. Here you will learn what the FM modifier does, why it exists, and where it can surprise you.5 min readTO_CHAR, TO_DATE, and TO_NUMBER with simple formats, as in the earlier chapters. You should also be abl5 min readdual and know that a DATE value stores a date and a time. Earlier chapters covered format models and TO_CHAR. Here you use the same format models in the other direction. TO_DATE reads text and builds a DATE.5 min readTO_NUMBER reads text, which format elements matter when parsing, why parsing fails, and how to keep bad data fr5 min readTO_DATE and TO_CHAR with a format model, as covered earlier in this tutorial. It also assumes you know what DUAL is. The chapter covers how Oracle chooses a century for a two-digit year, where RR and YY differ, and how to avoid century mistakes.5 min readTO_CHAR, TO_DATE, and TO_NUMBER in earlier chapters. Here you will learn to read the errors these functions raise, find the cause, and decide whether to fix the data, the format model6 min readDEFAULT ... ON CONVERSION ERROR clause and the VALIDATE_CONVERSION function. This chapter shows how to use6 min readTO_CHAR, TO_DATE, and TO_NUMBER with format models. The question here is where in a WHERE clause a conversion should go, so that a query can still use an index on the colu7 min readTO_CHAR, TO_DATE, NLS settings, and conversion errors. Timestamps reuse those ideas and add fractional seconds and time zones. The main difference is that some DATE rules no longer apply.5 min read