Tuesday 26 November 2013

Working with oracle timezone format TZR TZH TZM

Bismillahir Rahmanir Raheem

Today we will look to some format that are used to convert or outputting more precise information.

TZH--
This gives the hour from the timezone and is only valid with timestamp and interval formats

TZM----
This gives the minute from the timezone and is only valid with timestamp and interval formats

TZR---
This gives the time zone region information and is only valid with timestamp and interval formats

alter session set time_zone='asia/calcutta';

select to_char(systimestamp,'TZR-TZH-TZM')
from dual;

this will give us

Asia/calcutta-+05-30

NOte-- remember all these formats are only valid with timestamp and interval types not with date type

No comments:

Post a Comment