1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

DateTime.TryParse optimization

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

  1. krajek

    krajek New Member

    Sep 2, 2010
    Likes Received:
    Trophy Points:
    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.


Share This Page