How to set preferred date/time format for queries

Discussion of open issues, suggestions and bugs regarding database management and development tools for Oracle
Post Reply
gschiff
Posts: 14
Joined: Wed 23 May 2012 00:50

How to set preferred date/time format for queries

Post by gschiff » Wed 23 May 2012 01:03

New user question....

When I query: select * from table_name where create_date > '20-May-2012 17:00:00'

I get: ORA-01830 - Date format picture ends before converting entire input string

I have set my dbForge Data Editor Formatting options to:
Date = dd-MMM-yyyy
DateTime = dd-MMM-yyyy HH:mm:ss

Is the date/time syntax that I must use in my query dictated by my server, or my Oracle client, or my OS? Can I override that so dbForge accepts my preferred date/time format?

gschiff
Posts: 14
Joined: Wed 23 May 2012 00:50

Re: How to set preferred date/time format for queries

Post by gschiff » Wed 23 May 2012 02:05

Never mind, I think I got it. I found out I can set my NLS_DATE_FORMAT environment variable in Windows, and then my Oracle client will honor that preference in most applications, including DBForge.

.jp
Devart Team
Posts: 345
Joined: Wed 09 Sep 2009 06:55
Location: devart

Re: How to set preferred date/time format for queries

Post by .jp » Wed 23 May 2012 09:21

We are glad that this problem is not connected with our product and that you solved it.
Please do let us know if we can assist you any further.

Post Reply