473,327 Members | 2,012 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,327 software developers and data experts.

converting datetime

I would like to convert a datetime to a specific format. I was trying
to use Convert.ToString(date,
CultureInfo.CurrentCulture.DateTimeFormat.ShortDat ePattern) but I got
some error. I would just like to see the date, not the time, how do I
do that ?

Feb 8 '07 #1
4 1497
If you just want to see the short date pattern, then you can try

date.ToString("d")

=================
Clay Burch
Syncfusion, Inc.

Feb 8 '07 #3
On 8 Feb, 11:43, huberm...@gmail.com wrote:
what about:http://msdn2.microsoft.com/en-us/library/8kb3ddd4.aspx
thx that helped, but I couldn't find anything that shows the
weeknumber of the year.

Feb 8 '07 #4
<wa*********@gmail.comwrote in message
news:11**********************@l53g2000cwa.googlegr oups.com...
thx that helped, but I couldn't find anything that shows the
weeknumber of the year.
Generally speaking, people aren't psychic - there was no mention of week
number in your OP...

No matter - what you require isn't particularly difficult in C#:
http://www.codeproject.com/csharp/GregToISO.asp

Feb 8 '07 #5

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

Similar topics

3
by: Nikola | last post by:
Hi all, I have a problem converting datetime to integer (and than back to datetime). Depending whether the time is AM or PM, same date is converted to two different integer representations,...
3
by: sunny076 | last post by:
Hi, I am trying to convert from Julian to Gregorian data in C#. I was exploring teh JulianCalendar and Gregorian calendar classes but still not sure how I can do it. For example, the Julian date...
4
by: Saso Zagoranski | last post by:
Hi! I have created an SqlCommand object and I have set some parameters to it... One of the parameters is of the DateTime type; here is the code: sqlCommand.Parameters.Value =...
4
by: M. Uppal | last post by:
How do i convert fraction to time in c#. I need to convert 0.25 to time. Excel does this by using Selection.NumberFormat = "h:mm:ss;@" of the Cell Format function. thanks, M. Uppal
1
by: Andrew Baker | last post by:
this seems to be an SQL Server error but I cant work out how it is occuring. Itr is also after 3am and I cant keep working but need to demo by tomorrow. TIA. The code is: Private Sub...
8
by: Mika M | last post by:
Is there better way to convert integer type date into DateTime type date as doing like code below? Dim intDate As Integer = 20051019 Dim dte As DateTime = New DateTime( _...
3
by: NateM | last post by:
How do I convert any given date into a milliseconds value that represents the number of milliseconds that have passed since January 1, 1970 00:00:00.000 GMT? Is there an easy way to do this like...
6
by: minboymike | last post by:
Hello everyone, I am working on a project when I have to convert a C# program into Native C for speed purposes. I am using a .dll that creates a DateTime object. Obviously, there is not...
2
by: joyjignesh | last post by:
hi i have make a report with mshflexgrid. the report between two date. when i have written query .open"select * from tablename where t_date>=convert(datetime,' " & text1.text &"') and ...
1
by: Matt | last post by:
Hi all, So a lot of digging on doing this and still not a fabulous solution: import time # this takes the last_modified_date naive datetime, converts it to a # UTC timetuple, converts that...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.