🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.pl.comp.lang.csharp
2 messages
2 total messages Started by ratullloch_delthis Fri, 03 Dec 2010 20:30
using current date and time format as serial number tia sal22
#21863
Author: ratullloch_delthis
Date: Fri, 03 Dec 2010 20:30
9 lines
1195 bytes
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
This would represent december 03 2010, 09:49:33.416 am  Also how would I create the leading zero's

tia sal22
Re: using current date and time format as serial number tia sal22
#21856
Author: Peter Duniho
Date: Fri, 03 Dec 2010 20:41
17 lines
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads