Solved

DateTime.Now.ToString("YYMMDD")  into Label

Posted on 2008-09-30
1
2,220 Views
Last Modified: 2013-12-17
I'm trying to pass a timestamp into a label  I already have one of the labels working correctly with this code:

this.lbl_time.Text = DateTime.Now.ToString("HHMM");

I would like to do this same for a lvl_date...  I thought it would be as simple as:

this.lbl_date.Text = DateTime.Now.ToString("YYMMDD");

Nope.  Any help?  Thank you again for your help!
0
Comment
Question by:ReganJ03
1 Comment
 
LVL 22

Accepted Solution

by:
p_davis earned 500 total points
ID: 22606290
ToString("yyMMdd")
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

810 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