473,406 Members | 2,345 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Date format is not changing

hi all, i m using these lines of code in my program. but when i
deploy , the live server machine doesn't change date format.

IFormatProvider culture=new CultureInfo("en-GB",true);

string a=string.Empty;

DateTime FromEntryDate=Convert.ToDateTime("01/01/1900");

if( txtStartEntryDate.Text.Trim()!=""){
a=txtStartEntryDate.Text;
FromEntryDate =
DateTime.Parse(a,culture,DateTimeStyles.NoCurrentD ateDefault);
//
FromEntryDate=DateTime.Parse(FromEntryDate.ToStrin g("MM/dd/yyyy"), new
CultureInfo("en-US").DateTimeFormat);
}

strSQL = string.Format("exec spSearchProperties @RefNo ='{0}',
@OwnerName = '{1}',@LocationId={2},@ProjectId
={3},@SortofId={4},@SellingAgentId={5},@Status='{6 }',@StartEntryDate='{7}'",
RefNo,OwnerName.ToString().Trim(),
LocationId, ProjectId, UnitTypeId,this.cboSellingAgent.SelectedValue,
Status,FromEntryDate.ToString("MM/dd/yyyy"));

objDAM.GetDataTable(strSQL,CommandType.Text, ref table);

Trace.Warn(strSQL);

--------------------

trace.warn gives following out put which is working fine but on local
server.

exec spSearchProperties @RefNo ='', @OwnerName =
'',@LocationId=0,@ProjectId
=0,@SortofId=0,@SellingAgentId=0,@Status='0',@Star tEntryDate='05/13/2008'

--------------------

but on deployment , trace.warn shows following line that is not
required, i want to get @StartEntryDate='05/13/2008', how can i get
that value.

exec spSearchProperties @RefNo ='', @OwnerName =
'',@LocationId=0,@ProjectId
=0,@SortofId=0,@SellingAgentId=0,@Status='0',@Star tEntryDate='13/05/2008
00:00:00'
thx
Jun 27 '08 #1
0 825

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: cg_news | last post by:
In short, what I am trying to do is, based on a date, calculate the week of year (as described in ISO 8601), then calculate the first and last date in this week period and return them in the format...
1
by: Shaiboy_UK | last post by:
Hi All, Sorry if this is the wrong newsgroup to post into, on this topic, if so, please point me in the right direction..... Currently working on a ASP for a friend, which requires the date...
1
by: jt | last post by:
I posted this yesterday, but I am not seeing this out yet: I am having problems with updating a date field in a certain format. The data is stored in an Oracle database. The date is...
5
by: Macca | last post by:
Hi, I have a table which has a date/time field. I am storing them as follows :- 01/01/2005 11:25 01/01/2005 19:44 02/01/2005 05:04
6
by: Willie wjb | last post by:
Hi, i have a client program that sends a filter expression to the server PC. On that server PC this filter is put over a datatable and the result is send back. the server can be located on a...
20
by: andreas | last post by:
When I copy a vb.net project using date formats from one PC with a windows date format f.e. dd/mm/yyyy to another PC having a format yy/mm/dd then I get errors. How can I change for a while in the...
21
by: Darin | last post by:
I have an applicatoin that works 100% perfect when running on a machine setup for English (United States), but when I change it to Spanish (Mexico), the dates start giving me fits. THe reason is...
5
mgpsivan
by: mgpsivan | last post by:
Hi, i have form in Asp.net(2003) in that i've to change the format of the date by the following statement Format(Date.Today, "dd/mm/yyyy") but when i give this code the month part displays as...
3
by: Tony WONG | last post by:
The date format (control panel) of testing (VS2005) and production platform are yyyy/mm/dd. i run preview from testing (VS2005). The date format is yyyy/mm/dd however, when i put the code to...
3
by: Bface | last post by:
Hi all, Hope everyone had a good holiday. I am having a difficult time changing the date format of a field from Excel. I have never had this problem before. I link the excel spreadsheet to my DB,...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.