DateTime.TryParse optimization

Discussion in 'C#' started by krajek, Sep 2, 2010.

  1. krajek

    krajek New Member

    Joined:
    Sep 2, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi,
    I've recently step into speed optimization issue that I can't go any futher for few days.
    I'm doing export from database (Microsoft Sql Server 2008) to file for 10k (or generally big number) records, in every record there is a date that should be formatted, unfortunately I'm getting this date as string, looking like this:
    "Feb 11 2009 1:44PM" because I decrypt value from database with CONVERT(NVARCHAR,DECRYPTBYKEY(...)).
    I wonder if there is faster way to check is string variable is really a date, or maybe I can check that in sql query or somewhere else. Anyway I'm stuck, nothing comes to my head.

    Cheers
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice