Solved

ALTER SESSION SET NLS_DATE_FORMAT="DD-MM-YYYY";

Posted on 2004-10-19
4
13,912 Views
Last Modified: 2010-05-18
ALTER SESSION SET NLS_DATE_FORMAT="DD-MM-YYYY";

i HAVE TO DO THIS IN ORDER FOR THE BELOW TO WORK IN ASP.NET

EVERY TIME.

IS THERE A WORK AROUND.

      select_statement += " Where To_Date(RC_DATE, 'dd-mm-yyyy') <= '" + DateString2.ToString() + "' And To_Date(RC_DATE, 'dd-mm-yyyy') >= '" + DateString1.ToString() + "'";
                        


0
Comment
Question by:mathieu_cupryk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 10

Expert Comment

by:jnhorst
ID: 12355345
Mathieu:

What is "DateString2"?

If you have a control that has a DateTime value, you can do this:

DateTimeValue.ToString("dd-MM-yyyy")

to format the date.  Make sure you cap the "MM", as the lower case "m" means "minute"; the upper case "M" means "month"

John
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 12356390
I suggest you to look a the CultureInfo class provided by the .Net framework whcih is used by the HttpContext.CurrentCulture and CurrentUICulture. By setting the correct culture you can change the way datetime objects are shown on the screen. The easiest way would be by setting the correct property in the web.config.

For example:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <globalization fileEncoding="utf-8" requestEncoding="utf-8" responseEncoding="utf-8" culture="nl-NL" uiCulture="nl-NL" />
 </system.web>
</configuration>

Look at the properties culture and uiCulture.

CJ.
0
 
LVL 22

Accepted Solution

by:
CJ_S earned 500 total points
ID: 12356402
... culture you can change the way datetime objects are shown on the screen ...

should be

... culture you can change the way datetime objects are shown on the screen and how they are used within your system.

However, when you are talking with a database you might have to always work with american date format (mm-dd-yyyy).
0
 

Author Comment

by:mathieu_cupryk
ID: 12376585
Excellent
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question