The Oracle TO_TIMESTAMP_TZ function can be confusing, but we’ll explain it in this video.
This function allows you to convert a string value into a TIMESTAMP WITH TIME ZONE value.
A TIMESTAMP WITH TIME ZONE value is a type of DATE, but has a few components:
- A date, including day, month, and year
- A time, including hours, minutes, and seconds
- A time zone, which is the number of hours and minutes difference from GMT
This is a useful data type because it allows you to store dates in different time zones, and allow users in other time zones to see the data in a way that makes sense to them.
The time zone part is the difference from GMT. This means that a “+7:00” is 7 hours ahead of GMT (e.g. Bangkok) and “-5:00” is 5 hours behind GMT (e.g. US Eastern Standard Time).
The syntax of the TO_TIMESTAMP_TZ function is:
TO_TIMESTAMP_TZ ( input_string [, format_mask] [, nls_param] )
The input_string parameter is the string you want to convert.
The format_mask is where you specify the format of the input_string parameter. This is so you can specify the input_string in a variety of formats, and just use this format_mask to indicate which format it is in.
The nls_param parameter is another optional parameter, and allows you to specify the returning language of the month and day names.
For more information on the Oracle TO_TIMESTAMP_TZ function, including the SQL used in this video, read the related article here:
Looking for someone like-minded? Chances are you’ve already got one thing in common.
15,000 New members.
Soulmates sees over 15,000 new faces every month.
#1 Customer service.
Feel safe and secure, with help from our award-winning customer service team.
Recently joined Soulmates.
Meet some of our latest members.
Online Dating Success Stories.
Intrepid explorers who’ve found the person of their dreams.
Kristian & Zoe.
"We met through Soulmates four years ago. Although were both based in London, the chances of us meeting by other means were slim. We just got married! Zoe is the most wonderful woman Ive ever met, and I know we are going to have an extremely happy life together."
Laura & Phil.
"Phil and I got married just over a year after we met on my first ever internet date through Guardian Soulmates. Weve been recommending the site to friends ever since. Thank you!" (Photography credit to Michael OSullivan)
Robin & Alec.
"I just wanted to let you know that you have another success story! My boyfriend, who I met via your site about two years ago, just proposed and we are getting married next year. THANK YOU!"
Alex & Rosie.
"Rosie and I met through Soulmates and were married in October, just 17 months later. Were wonderfully happy together!"
How does it work?
Find your Soulmate in three easy steps.
Register your free account today.