DateTime function

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • TaeHo Yoo

    #1

    DateTime function

    First of all thanks all guys for your time to look at my problem.

    The problem I am having is datetime function.
    Basically, I would like to have a datetime function that works machine
    independently.
    So regardless of the format of datetime string(ie,
    d/MM/yyyy,dd/MM/yyyy,yyyy/MM/dd), this function takes this string and
    convert it to the correct datetime that my server could recognise as
    datetime(which is d/MM/yyyy).

    Thanks again,




    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
  • Carl Prothman [MVP]

    #2
    Re: DateTime function

    "TaeHo Yoo" <yootaeho@yahoo .com> wrote[color=blue]
    > The problem I am having is datetime function.
    > Basically, I would like to have a datetime function that works machine independently.
    > So regardless of the format of datetime string(ie,
    > d/MM/yyyy,dd/MM/yyyy,yyyy/MM/dd), this function takes this string and
    > convert it to the correct datetime that my server could recognise as
    > datetime(which is d/MM/yyyy).
    >[/color]

    TaeHo,
    Use the DateTime.Parse method. It contains several overload methods which allow you
    to specify the CultureInfo, so it knows how to parse different culture formats.

    For more information, see the sample code VB.NET code at the bottom of the following page
    http://msdn.microsoft.com/library/en...parsetopic.asp

    --

    Thanks,
    Carl Prothman
    Microsoft ASP.NET MVP





    Comment

    Working...