Oracle TO_DATE Function – SQL Syntax Examples

AshokTechnical Tips2 Comments

The Oracle TO_DATE SQL function is used to convert a TEXT or NTEXT representation of a date into an Oracle DATETIME value.

Below shows the TO_DATE function along with the arguments it takes:

1
to_date(string)
1
to_date(string, date_format)
1
to_date(string, date_format, options)

The Oracle TO_DATE function returns a DATETIME representation of the string input using the date_format input.

Oracle INSTR Function – SQL Syntax Examples

AshokTechnical Tips8 Comments

The Oracle INSTR SQL function is popular and performs materially the same operation as instr functions in many other programming languages.

Below shows the INSTR function along with the arguments it takes:

1
instr(string, SUBSTRING)
1
instr(string, SUBSTRING, start_position)
1
instr(string, SUBSTRING, start_position, occurrence)

The Oracle INSTR function returns the position (an integer) within string of the first character in substring that was found while using the corresponding start_position and occurrence.