iAlpine.net
A journey of exploration and discovery

C# example of a wroking datetime format in MS-SQL.

February 8, 2010 13:06 by mihko


Formatting of a DateTime type can sometimes be a tricky thing when working with C# and MS-SQL data. This is due to many different SQL collation settings and also datetime standards.

Since SQL has a DateTime standard in the format: 2010-01-20T00:00:00, everytime I deal with it in C# I use a String.Format method for conversion:

Example:

String.Format("{0:s}", Datetime.NOW);

With this method I am sure that MS-SQL will deal correctly with my DateTime.


Comments

March 1. 2010 14:45

jobs uk

I can see that you are putting a lot of time and effort into your blog and detailed articles! I am deeply in love with every single piece of information you post here (there are not many quality blogs leftSmile.By,the way if you are looking for link exchange with quality job borad in UK,please drop an email-I will be glad to add your link.

Regards,
Chris

jobs uk

March 25. 2010 15:35

Friends

Thank you for another fantastic blog. Where else could I get this kind of information written in such an incite full way? I have a project that I am just now working on, and I have been looking for such information... Regards…

Friends

April 5. 2010 17:38

free macbook pro

Fantastic site, where did you come up with the info in this piece of content? I'm pleased I found it though, ill be checking back soon to see what other articles you have.

free macbook pro

April 10. 2010 18:18

Dave Atkins

Your penning method is pleasing and the way you managed the subject with grace is commendable. I'm intrigued, I presume you are an professional on this subject. I just sign up for the RSS feed. Smile

Dave Atkins

June 22. 2010 05:54

Casual For Men

Hi. I just noticed that your site looks like it has a few code problems at the very top of your website's page. Is it an older version of BE?  I'm not sure if everybody is getting this same bugginess when browsing your site? I am employing a totally different browser than most people, referred to as Opera, so that is what might be causing it? I just wanted to make sure you knew. Thanks for posting some great postings and I'll try to return back with a completely different browser to check things out!

Casual For Men

July 22. 2010 12:34

Halina Yoss

HO YA c# example of a wroking datetime format in ms-sql. c# example of a wroking datetime format in ms-sql. c# example of a wroking datetime format in ms-sql.I have been surfingonline above three hours today, yet I by no means found any exciting article similar to yours about c# example of a wroking datetime format in ms-sql. It's pretty worth enough for me. Personally, if every site owners and bloggers made good quality content as you did, the web are going to be much more helpful than ever before.

Halina Yoss

July 27. 2010 05:27

Daniela Ohlen

I adore this webpage

Daniela Ohlen

July 28. 2010 04:06

Freeman Todorovich

Hello webmaster, your internet page's design is wonderful and i like it. Your posts are wonderful. Please keep up the nice work. Sincerely!!!

Freeman Todorovich

August 9. 2010 12:52

Murano wall sconce

hey, your post really aids, now i receive the same troubles, and i have no clue on what to do to solve the problem. luckily i look bing and discovered your post, it helps me get rid of my trouble.

Murano wall sconce

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading




  

Sponsors


www.knetit.net

Kiva - loans that change lives


  

Job Board for Web Designers and Web Developers

The On Demand Global Workforce - oDesk

affiliate_link