Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8991783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:48:27+00:00 2026-06-15T22:48:27+00:00

We are using Oracle 11g and we have a table with a timestamp column

  • 0

We are using Oracle 11g and we have a table with a timestamp column which doesn’t contain the timezone (simply defined as TIMESTAMP). The timezone is written in a different column.

I want to be able to use the ‘max’ function while taking the timezone into account.
There’s probably a function to convert timezones easily and I just don’t know it.

I want to be able to do something like this:

SELECT max(covert_to_timezone(my_timestamp, my_timezone, 'GMT')) FROM my_table

How can I do that?

==================

Solution: According to Ajith Sasidharan’s answer:

SELECT max(from_tz(my_timestamp, my_timezone) at time zone '0:00') FROM my_table

Update: If you want to compare dates, simply use ‘cast’:

SELECT max(from_tz(cast(my_date as timestamp), my_timezone) at time zone '0:00') FROM my_table

Btw, now I got ‘ORA 01878’ errors, meaning our table contains invalid times (DST shit).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T22:48:28+00:00Added an answer on June 15, 2026 at 10:48 pm

    I guess you want a function like this ::

    select to_char((from_tz(to_timestamp(to_char(DATABASE_DATE, 'YYYY-MM-DD HH:MI:SS PM'), 'YYYY-MM-DD HH:MI:SS PM') ,'America/New_York')
        at time zone 'America/Los_Angeles'),'YYYY-MM-DD HH:MI:SS PM TZD') as localtime
        from table
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using oracle 11g and have written a stored procedure which stores values
I'm using oracle 11g sql developer I have a varchar2 column with dates as
I am developing an application using oracle 11g, Java(struts2) and Hibernate. I have table
I'm using Oracle 11g R2. I have a table with 9.1 billion rows. When
I am using Oracle 11g r2 . I have a table that stores images
I am using PL/SQL (Oracle 11g) to update the EMPLOYEES table salary column. I
Using Oracle 11g, I have the following LDAP string which is only a subset
I am using oracle 11g and have a table with an XMLType. There are
I am connecting C# with Oracle 11g. I have a DataTable which i fill
Using Oracle 11g release 2, the following query gives an ORA-01790: expression must have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.