Article View: alt.pl.comp.lang.csharp
Article #21856Re: using current date and time format as serial number tia sal22
From: Peter Duniho
Date: Fri, 03 Dec 2010 20:41
Date: Fri, 03 Dec 2010 20:41
17 lines
2292 bytes
2292 bytes
On 12/3/10 12:30 PM, ratullloch_delthis wrote: > Greetings All > > I would like to use the current date and time as a serial number in csharp what command or tutorial if there is one should I use? > example: of what I'm trying to produce. > > 12 03 2010 09 49 33.416 That's not a serial number. A serial number would be, for example, simply taking the value of the DateTime.Ticks property. What you're asking for is a custom date format. Which you can accomplish easily using .NET's custom date format codes. http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx Pete
Technical Details
Message-ID:
<YO-dnRThc6GLy2TRnZ2dnUVZ_uednZ2d@posted.palinacquisition>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!nf1.ipartners.pl!ipartners.pl!plix.pl!newsfeed1.plix.pl!newsfeed00.sul.t-online.de!t-online.de!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.posted.palinacquisition!news.posted.palinacquisition.POSTED!not-for-mailReferences:
<ercKo.454593$Yn5.406058@en-nntp-14.dc1.easynews.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!nf1.ipartners.pl!ipartners.pl!plix.pl!newsfeed1.plix.pl!newsfeed00.sul.t-online.de!t-online.de!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.posted.palinacquisition!news.posted.palinacquisition.POSTED!not-for-mail NNTP-Posting-Date: Fri, 03 Dec 2010 14:41:58 -0600 Date: Fri, 03 Dec 2010 12:41:58 -0800 From: Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 MIME-Version: 1.0 Newsgroups: microsoft.public.dotnet.languages.csharp,alt.pl.comp.lang.csharp Subject: Re: using current date and time format as serial number tia sal22 References: <ercKo.454593$Yn5.406058@en-nntp-14.dc1.easynews.com> In-Reply-To: <ercKo.454593$Yn5.406058@en-nntp-14.dc1.easynews.com> Message-ID: <YO-dnRThc6GLy2TRnZ2dnUVZ_uednZ2d@posted.palinacquisition> Lines: 17 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 71.164.23.111 X-Trace: sv3-QX72g7fw6QYA/dQ2vEvrheTLRYhCuyEjZBam83MhOYM2POa+4Z1Jwaz12PxqlHZ6lrkm3e+d46f3axv!QZ5YjLNTqvtRr5XqVWTPkREITZz4GEw0DqVe0vRHtCEhf4GvTVT4QuLH29b7LwaUjG7SRFY8F+yb!whY5ltTIsBOmIZ1PUkjcDdkLDhmJ7Z/Xrci8DanaeXc= X-Complaints-To: abuse@iinet.com X-DMCA-Complaints-To: abuse@iinet.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1991 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit