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

Re: printing time in log messages

On Oct 14, 2:42*pm, za...@construction-imaging.com wrote:
On Oct 14, 2:03*pm, puzzlecracker <ironsel2...@gmail.comwrote:
On Oct 14, 1:56*pm, za...@construction-imaging.com wrote:
On Oct 14, 1:51*pm, puzzlecracker <ironsel2...@gmail.comwrote:
I have this string *string time =
System.DateTime.Now.ToLongTimeString(); it is equal to 1:00:22 PM
I need it to be 13:00:22
Any suggestions how to format it?
Thanks
string.Format("{0:HH}:{1:mm}:{2:ss}", Now, Now, Now)
This is just one of many ways it can be done.
Argh, I don't think sting has Format member function :(

Yes, it does. I use it all the time.
Sorry, I thought you were referring to string instance, and the
class. Chuck I wrote exactly what you posted, and msdn link is a
great reference.

Oct 14 '08 #1
0 997

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

Similar topics

1
by: Dave | last post by:
Hi, Can anyone direct me to any articles on the best way to give a print option in VB & ASP .net Cheers
2
by: jim_geissman | last post by:
I have a script or SP that takes a very long time to perform multiple tasks, and after each one there is a PRINT statement that shows the time and what was just accomplished, to help me monitor...
5
by: zeljko.markic | last post by:
I want to implement silent printing in my project to print reports programmatically, so that a user will not see any pop-up messages to do with the printing process. For instance, I want to hide...
1
by: hamil | last post by:
I am trying to print a graphic file (tif) and also use the PrintPreview control, the PageSetup control, and the Print dialog control. The code attached is a concatination of two examples taken out...
0
by: melanieab | last post by:
Hi, When the print button is clicked, I save a snapshot of the screen to a bitmap file. Graphics currentTab = this.CreateGraphics(); Size s = this.Size; Bitmap memoryImage = new Bitmap(s.Width -...
7
by: Leo Breebaart | last post by:
I have another question where I am not so much looking for a solution but rather hoping to get some feedback on *which* solutions people here consider good Pythonic ways to approach a issue. ...
9
by: ewolfman | last post by:
Hi, I need to provide the user with the option to click something, and what follows is: 1. Download a word document, without displaying winword. 2. Printing the document to the default printer...
0
by: Hank | last post by:
We have been printing pdf files through Adobe, from Access for several years. Adobe version 5.0 is currently installed. Recently we have received PDF files that were created under the Adobe 7.0...
3
by: tbest4475 | last post by:
AIX I have a set of commands that run and if a difference is found it prints a message to an array and then sends that array in an email. certain messages are not printing the new line after the...
18
by: Brett | last post by:
I have an ASP.NET page that displays work orders in a GridView. In that GridView is a checkbox column. When the user clicks a "Print" button, I create a report, using the .NET Framework printing...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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,...

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.