Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Date format

Posted on 2006-06-23
3
Medium Priority
?
250 Views
Last Modified: 2008-02-01
Hello experts,

How do I format a date in c# to read as follows;-


YYYY-MM-DD-hh.mm.ss.000000


where 000000 is the milliseconds

Many Thanks
0
Comment
Question by:claracruz
[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
  • 3
3 Comments
 
LVL 7

Expert Comment

by:pradeepsudharsan
ID: 16968991
System.DateTime a1=System.DateTime.Now;
Response.Write(a1.ToString("yyy-MM-dd-hh.mm.ss.000000"));

--pradeep
0
 
LVL 7

Expert Comment

by:pradeepsudharsan
ID: 16969029
sorry
use this
System.DateTime a1=System.DateTime.Now;
Response.Write(a1.ToString("yyy-MM-dd-hh.mm.ss.mmmmmm"));

--pradeep
0
 
LVL 7

Accepted Solution

by:
pradeepsudharsan earned 2000 total points
ID: 16969074
again sorry
use this
System.DateTime a1=System.DateTime.Now;
Response.Write(a1.ToString("yyy-MM-dd-hh.mm.ss.mmm"));//milli seconds
previous one for micro seconds.
i confused with "000000"

regards
--pradeep
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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 Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

636 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