[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2004-10-19
4
Medium Priority
?
13,963 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 2000 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

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

656 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