day month year

Discussion in 'ASP .Net' started by =?Utf-8?B?am9l?=, Apr 8, 2006.

  1. how to get the
    day if 1-9 then 01-09 else 11-31
    month if 1-9 then 01-09 else 10-12
    year 01-99
    =?Utf-8?B?am9l?=, Apr 8, 2006
    #1
    1. Advertising

  2. Response.Write (DateTime.Now.ToString("MM"));
    Response.Write (DateTime.Now.ToString("yy"));
    Response.Write (DateTime.Now.ToString("dd"));
    --
    HTH,
    Phillip Williams
    http://www.societopia.net
    http://www.webswapp.com


    "joe" wrote:

    > how to get the
    > day if 1-9 then 01-09 else 11-31
    > month if 1-9 then 01-09 else 10-12
    > year 01-99
    =?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=, Apr 8, 2006
    #2
    1. Advertising

  3. =?Utf-8?B?am9l?=

    Teemu Keiski Guest

    E.g with string formatting. More information about it:

    Formatting Types
    http://msdn2.microsoft.com/en-us/library/fbxft59x(VS.80).aspx

    --
    Teemu Keiski
    ASP.NET MVP, AspInsider
    Finland, EU
    http://blogs.aspadvice.com/joteke

    "Phillip Williams" <> wrote in message
    news:...
    > Response.Write (DateTime.Now.ToString("MM"));
    > Response.Write (DateTime.Now.ToString("yy"));
    > Response.Write (DateTime.Now.ToString("dd"));
    > --
    > HTH,
    > Phillip Williams
    > http://www.societopia.net
    > http://www.webswapp.com
    >
    >
    > "joe" wrote:
    >
    >> how to get the
    >> day if 1-9 then 01-09 else 11-31
    >> month if 1-9 then 01-09 else 10-12
    >> year 01-99
    Teemu Keiski, Apr 8, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?QnJhZCBSb2JlcnRz?=
    Replies:
    1
    Views:
    371
    =?Utf-8?B?UGF1bA==?=
    Aug 23, 2004
  2. Laguna
    Replies:
    20
    Views:
    779
    John Machin
    Sep 15, 2005
  3. Replies:
    1
    Views:
    435
    Steve W. Jackson
    Dec 22, 2006
  4. Highlander
    Replies:
    13
    Views:
    2,869
    Highlander
    Jan 2, 2007
  5. Rob Redmon

    Convert day of year to month, day

    Rob Redmon, Apr 4, 2008, in forum: Ruby
    Replies:
    7
    Views:
    282
    Alex Wayne
    Apr 4, 2008
Loading...

Share This Page