Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Output for DateTime string format 1

Status
Not open for further replies.

xcaliber2222

Programmer
Apr 10, 2008
70
US
Hello,

Sorry for the repost, but I had no reply from the asp.net group, and the language for my project is VB.NET so I thought I would try here.

I am trying to get the output for:
DateTime.Now.ToString("yyMMddHHmmssffff")

The problem is all I get back as display is:
090701133

From what I'm seeing on MSDN this "should" work, but it seems I'm only getting back the yyMMdd part(090701) and the HHmm part(133).

Thanks,
Alejandro
 
Bit odd - I put the expression into a windows application project and it worked fine - got all the digits out.

HHmm part of your expression doesnt seem to have worked properly - HH should give hours from 00 to 23 so it is 13 in your example with 3 for minutes - looks like the string has been truncated on display but i assume you've checked that - looks like a run in debug to see whats happening

 
Thank you huggyboy. I think it is being truncated, although I didn't see why at first. Thanks for your replay and feedback. I really appreciate you taking the time.
Best Regards,
Alejandro
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top