• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to insert GMT+05:30 in ORACLE

 
Greenhorn
Posts: 27
Eclipse IDE Oracle Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Actually i want to select customers from the table whose lastacssts should be greater than the time i will be getting from Date object in JAVA.
What i am doing is getting that value from JAVA date which returns the date object in following format

Thu May 26 18:07:57 GMT+05:30 2011



but when i want to execute the above query in ORACLE i am not getting the abbreviation CODE .Given below is the Oracle query i am executing


The Datatype of lastacssts is Date in ORACLE


I Get Following Error

ORA-01857: not a valid time zone
01857. 00000 - "not a valid time zone"
*Cause:
*Action:



So anyone has any idea about how can i represent GMT in oracle Query because when i remove GMT from the query and just place +05:30 it runs fine but from JAVA
I am getting GMT+05:30 and i cant separate GMT from +05:30.I searched on internet but did not find any solution for that.

Any Help Regarding this would be appreciated.

Thanks in advance
 
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Pawan,

Why do you use timestamp? Can you post the fraction of java code? Let us see how you pass date parameter to query statement.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic