Monday, March 31, 2014

Developing On My Own

Well, I got laid off about two weeks ago. The company I worked for was very generous. I have applied for many jobs, so now I am waiting and looking. I guess I will start developing some things and learning new things on my own. I have a Visual Basic book that has a section on making mobile apps. Maybe I will try that first.

Thursday, February 20, 2014

Military DateTime in SQL Query

This is how I got my DateTime to have Military time.

SELECT CONVERT(VARCHAR, GetDate(), 101) + ' ' + CONVERT(VARCHAR, GetDate(), 108)

Date Time formats in SQL Query

I am currently converting SSRS reports from Oracle to SQL.  I needed the DateTime in the 24 hour format.  So here's what I found about the different formats. After putting the following statements in my query, my results are as follows.

Select

convert(varchar, getdate(), 100),
convert(varchar, getdate(), 101),
convert(varchar, getdate(), 102),
convert(varchar, getdate(), 103),
convert(varchar, getdate(), 104),
convert(varchar, getdate(), 105),
convert(varchar, getdate(), 106),
convert(varchar, getdate(), 107),
convert(varchar, getdate(), 108),
convert(varchar, getdate(), 109),
convert(varchar, getdate(), 110),
convert(varchar, getdate(), 111),
convert(varchar, getdate(), 112),
convert(varchar, getdate(), 113),
convert(varchar, getdate(), 114),
convert(varchar, getdate(), 120),
convert(varchar, getdate(), 121),
convert(varchar, getdate(), 126),
convert(varchar, getdate(), 127),
convert(varchar, getdate(), 130),
convert(varchar, getdate(), 131),

From Your Table Name

Here are the results.