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 7929905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:14:35+00:00 2026-06-03T20:14:35+00:00

I need to compare between userCurrentDate to a list of options. The options is

  • 0

I need to compare between userCurrentDate to a list of options.

The options is a table in the database that contain time attribute (definition: TIMESTAMP(6) WITH TIME ZONE. in oracle). Each option have his time zone.

The userCurrentDate (definition Date. in java) is a parameter that hold the user time and date with offset. The user can be from all over the world, so each user is in different time zone.

I need to compare between the user current date to the options date.
So i need to get this 2 parameters in the same time zone.

How can i get this 2 parameters in the same time zone, in SQL?

I tried to get them in GMT, so i can get them in the same base, like this:

trunc(SYS_EXTRACT_UTC(o.time)) = trunc(sysdate)  

But its not a good solution.

So, i need to get them in the same timezone. how can i get that in an SQL command (or other solution)?

  • 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-03T20:14:36+00:00Added an answer on June 3, 2026 at 8:14 pm

    I resolve this problem with at time zone oracle function.
    used:

    to_timestamp_tz(to_char(CAST(FROM_TZ(CAST(sysdate AS TIMESTAMP), 'GMT') AT TIME ZONE o.time AS DATE) 
    

    and compare it to each other.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to compare a int value with a datetime in a SQLExpress table.
I need to compare between two int arrays of different size. It has to
I'm wondering what is faster. I need to compare the number of seconds between
I want to compare(finding remaining days and time between two days) using joda time.
I need to compare 2 dates and return the number of days in between
I need to compare chksum (NUM1 and NUM2) between file1 to file2 (see example
I want to find time difference between two date and then compare the difference
I need format type DateTime into: dd/mm/yyyy. I want to add, sub, compare between
i need to select some records from table Tr_cashbook between two date. the date
I have 2 arrays of 16 elements (chars) that I need to compare and

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.