473,385 Members | 1,873 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,385 software developers and data experts.

DateTimeFormat

Hi All
Date/Time: 9/29/2004 6:02:13 PM

This date and time Iam getting from Database,but I want to remove
seconds ":13"
Just I want to remove this Like ":13".
I want like this : 9/29/2004 6:02 PM

Please help me.

Regards
Venu

Nov 16 '05 #1
4 3909
This is one way: String.Format ("{0:MM/dd/yyyy hh:mm}", <data column
reference>)

"Karunakararao" <ka************@i-vantage.com> wrote in message
news:eq**************@tk2msftngp13.phx.gbl...
Hi All
Date/Time: 9/29/2004 6:02:13 PM

This date and time Iam getting from Database,but I want to remove
seconds ":13"
Just I want to remove this Like ":13".
I want like this : 9/29/2004 6:02 PM

Please help me.

Regards
Venu


Nov 16 '05 #2
Here Dates we are populating based on Regional optional settings that's
why we can not formating the Dates.
With out formating how can i Remove the Second's

Regards
Venu
"Shiva" <sh******@online.excite.com> wrote in message
news:O2**************@TK2MSFTNGP10.phx.gbl...
This is one way: String.Format ("{0:MM/dd/yyyy hh:mm}", <data column
reference>)

"Karunakararao" <ka************@i-vantage.com> wrote in message
news:eq**************@tk2msftngp13.phx.gbl...
Hi All
Date/Time: 9/29/2004 6:02:13 PM

This date and time Iam getting from Database,but I want to remove
seconds ":13"
Just I want to remove this Like ":13".
I want like this : 9/29/2004 6:02 PM

Please help me.

Regards
Venu

Nov 16 '05 #3
Perhaps, this way?
int i = DateString.LastIndexOf(":");
string SecRemovedStr = DateString.Remove (i, 3); // Assuming seconds always
in two digits.

"Karunakararao" <ka************@i-vantage.com> wrote in message
news:OE**************@TK2MSFTNGP14.phx.gbl...
Here Dates we are populating based on Regional optional settings that's
why we can not formating the Dates.
With out formating how can i Remove the Second's

Regards
Venu
"Shiva" <sh******@online.excite.com> wrote in message
news:O2**************@TK2MSFTNGP10.phx.gbl...
This is one way: String.Format ("{0:MM/dd/yyyy hh:mm}", <data column
reference>)

"Karunakararao" <ka************@i-vantage.com> wrote in message
news:eq**************@tk2msftngp13.phx.gbl...
Hi All
Date/Time: 9/29/2004 6:02:13 PM

This date and time Iam getting from Database,but I want to remove
seconds ":13"
Just I want to remove this Like ":13".
I want like this : 9/29/2004 6:02 PM

Please help me.

Regards
Venu


Nov 16 '05 #4
Thank U Shiva

Regards
Venu.

"Shiva" <sh******@online.excite.com> wrote in message
news:O2**************@TK2MSFTNGP10.phx.gbl...
This is one way: String.Format ("{0:MM/dd/yyyy hh:mm}", <data column
reference>)

"Karunakararao" <ka************@i-vantage.com> wrote in message
news:eq**************@tk2msftngp13.phx.gbl...
Hi All
Date/Time: 9/29/2004 6:02:13 PM

This date and time Iam getting from Database,but I want to remove
seconds ":13"
Just I want to remove this Like ":13".
I want like this : 9/29/2004 6:02 PM

Please help me.

Regards
Venu

Nov 16 '05 #5

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

Similar topics

0
by: Muralidhar Chennoju | last post by:
Hi All How to get the Current DateFormat based on the regional settings. The following statment is giving right data when it is windows based application, but when I try the same in Web...
8
by: John Wildes | last post by:
Hello all I'm going to try and be brief with my question, please tell me if I have the wrong group. We are querying transaction data from a DB3 database application. The dates are stored as...
6
by: bojan.pikl | last post by:
Hi, I am making a calendar. It is costum made and I would like to have the ability to choose the first day (Monday or Sunday). I know for the firstDayOfWeek, but I can't change it. What should I do?
7
by: bojan.pikl | last post by:
Hi, I am making a calendar. It is costum made and I would like to have the ability to choose the first day (Monday or Sunday). I know for the firstDayOfWeek, but I can't change it. What should I...
5
by: js | last post by:
I have a textbox contains text in the format of "yyyy/MM/dd hh:mm:ss". I need to parse the text using System.DateTime.Parse() function with custom format. I got an error using the following code. ...
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...
6
by: gh | last post by:
I am trying to format a datetime in a datalist label. Below is the aspx code I have, but I get an error: The name 'Format' does not exist in the current context. How do I format the datetime to...
5
by: CKKwan | last post by:
Dear All, Anybody know how can I get the Work Week of a given date using CSharp? Example, in SQL Server we can get using DATEPART(ww, date); I need something equavalent. Thanks In Advance
11
by: John Dann | last post by:
Is there a concise/efficient way to retrieve blocks of rows from a datatable with VB2005? I've got a datatable (let's call it AllData), constructed programmatically, that contains a lot of...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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...

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.