T-SQL: Convert DateTime to Short Date String

clock July 30, 2008 16:45 by author Ryan Montgomery

Recently, while trying to mash Team Foundation Server and SQL Server Reporting Services, I needed to convert a DateTime in SQL to a short date string. This is how I did it.

CONVERT(VARCHAR, ClosedDate, 101)

That's it. The definition for doing so is as follows:

CONVERT ( data_type [ ( length ) ] , expression [ , style ] )

MSDN has quite an article describing CONVERT in depth.



The Summer isn't over yet!

clock July 23, 2008 09:07 by author Ryan Montgomery

Man time flies! It's almost August, and that means the Summer of NHibernate is coming to an end! Well maybe not. But in case it does, you have to take the time to download and watch the series of videos covering all aspects of NHibernate. (code samples too!)

banner

  1. Setup and Basic Usage Pattern
  2. Exploring Query Methods and Syntaxes
  3. Exploring Query methods and Syntaxes (cont.)
  4. Exploring INSERT, UPDATE, and DELETE Semantics
  5. Introducing Transactions and Concurrency
  6. Modeling Foreign-Key Relationships in NHibernate

If you know nothing about NHibernate - watch them. If you think you know everything about NHibernate - watch them.



SQL Server Reporting Services Handy Expression

clock July 18, 2008 11:23 by author Ryan Montgomery

This morning I had the task of creating a TFS report to track our actual effort (in hours) for work items on projects. It's a special report for our accountants and the last thing I want to do is upset the guys who pay me. :)

I ran into some sticky situations that required some SSRS expressions to save me. One task was to default the start date of the report to the first day of the month. I set Start Date default value to the following expression.

=CDate(Month(Today()).ToString() + "/1/" + Year(Today()).ToString())

The second very important task was to alternate the row color. (TfsWorkITemTracking is the name of the DataSource)

=IIf(RowNumber("TfsWorkItemTracking") Mod 2 = 0, "Gainsboro", "White")



Good Times at GLUGnet

clock July 18, 2008 10:18 by author Ryan Montgomery

The good people at GLUGnet invited me to speak last night and I enjoyed the opportunity very much. As promised I have uploaded my sample pages and slides.

Links:

1. Google Blueprint

2. jQuery

3. IETester



GLUGnet Tomorrow

clock July 16, 2008 19:15 by author Ryan Montgomery

I will be speaking about jQuery at the Greater Lansing User Group (for .NET) tomorrow. Stop by if you'd like to have your JavaScript world turned upside down. I'll also be talking about CSS and why you really need to know it well when it comes to web development and jQuery. But I'll save that for tomorrow.

See you there!