Execute the following Microsoft SQL Server T-SQL datetime and date formatting scripts in Management Studio Query Editor to demonstrate the multitude of temporal data formats available in SQL Server.
First we start with the conversion options available for sql datetime formats with century (YYYY or CCYY format). Subtracting 100 from the Style (format) number will transform dates without century (YY). For example Style 103 is with century, Style 3 is without century. The default Style values – Style 0 or 100, 9 or 109, 13 or 113, 20 or 120, and 21 or 121 – always return the century (yyyy) format.
Dec 23, 2009
Nov 25, 2009
Using Failed Request Tracing to troubleshoot Classic ASP errors
One of the great troubleshooting features that is built in to IIS 7.0 is Failed Request Tracing, which lets you configure tracing rules on your server that will create detailed troubleshooting log files for custom failure conditions that you define. For example, you can capture the details for authentication failures by creating tracing rules that create log files for HTTP 401 errors.
smtp4dev
Dummy SMTP server that sits in the system tray and does not deliver the received messages. The received messages can be quickly viewed, saved and the source/structure inspected. Useful for testing/debugging software that generates email.Dummy SMTP server that sits in the system tray and does not deliver the received messages. The received messages can be quickly viewed, saved and the source/structure inspected. Useful for testing/debugging software that generates email.
Running classic ASP on IIS 7
It's not really difficult to run classic ASP on Internet Information Server 7, but there are some bumps down the road. Here's a little help to get you started.
Oct 7, 2009
22 CSS Button Styling Tutorials and Techniques
CSS button styling can be tricky and sometimes tedious. If you are looking for a simple and effective way of creating dynamic CSS buttons with cross browser compatibility, these tutorials are for you.
Jul 27, 2009
Examples of how to Calculate Different SQL Server Dates
Every now and then, you need to take the current date and calculate some other date. For instance, you might have an application that needs to determine what date is the first day of the month, or need to know the last day of the month. Now most of you probably already know how to separate the date into its piece (year, month, day, etc.) and use those pieces along with a number of functions to calculate a date that you might need. In this article, I will be showing how to use just the DATEADD and DATEDIFF function to calculate a number of different dates you might need to use in your applications
SQL DATEDIFF Magic: Yesterday, This Week, This Month and More
Limit results to Yesterday, this week, this month and more
Jul 25, 2009
Data Validation to Avoid Duplicate Values
Suppose you have a spreadsheet where you are entering a list of unique values, such as invoice numbers, customer names, etc. You don’t want to duplicate any of the data, as this would cause problems down the road, but at the same time the list might be too large for you to manually verify that no duplicate values have been entered.
You can use Data Validation to ensure that no duplicate values can be entered into your list. If a user accidentally enters a duplicate, an error message will pop-up telling them that they have entered an invalid value.
Jul 12, 2009
Using SQLCMD to Execute Multiple SQL Server Scripts
SQLCMD offers the :r command. When :r is encountered in a SQL script, it essentially tells the SQLCMD utility to include the file referenced into the calling script. This can afford you the opportunity to break up a single script into multiple scripts that represent functional areas of the database or to replace multiple SQLCMD calls with a single call to a main SQL file. Furthermore, using the :r command to execute multiple scripts in a single batch allows you define a single set of variables which can be seen by all the included scripts (provided there is no intervening GO terminator). SQLCMD was introduced in SQL Server 2005 and is the replacement for osql which Microsoft will be deprecating in a future release.
May 18, 2009
Deleting The Dreaded _vti_cnf Folders Created by FrontPage
-- if you want to only see the folders named _vti_cnf:
get-childitem -recurse -force -filter "_vti_cnf"
-- remove all folders named _vti_cnf with prompt:
Get-ChildItem $RootDir "_vti_cnf" -force -recurse | Remove-Item
-- remove all folders named _vti_cnf without prompt:
Get-ChildItem $RootDir "_vti_cnf" -force -recurse | Remove-Item -recurse
Get-ChildItem $RootDir ".svn" -force -recurse | Remove-Item -recurse
Removing .svn files with TortoiseSVN
Once in awhile I run into working copy folders from Subversion that I know longer want under version control. I want to “unversion” them. Usually I do some kind of find and delete on all the .svn related folders but there is an easier way if you have TortoiseSVN installed.
You should be familiar with the “Export” command. This will make a copy of the files in a new location without all those pesky .svn folders. If you want to ‘unversion’ something but don’t want a copy - simply do an “export” and when Tortoise asks for the “folder to export to” simply select the same folder your working copy is in! Tortoise will proceed to remove all the .svn folders.
May 17, 2009
Subversion and TortoiseSVN tips and tricks
Here is a list of Subversion and TortoiseSVN tips and tricks I collected during adoption of Subversion in couple of development teams.
Apr 23, 2009
Customizing the Look of Outlook Web Access
One way to impress your users and management is to customize Microsoft Office Outlook Web Access by using your organization's logo and colors. Customizing Outlook Web Access is a great way to help build an identity for your organization into a tool that many users rely on.
In this article, we'll show you how to customize the logon, language selection, and logoff pages, and how to create a theme by using a custom header. If you want to create an Outlook Web Access theme that has more complex changes for your organization, begin by studying how cascading style sheets (.css files) work. After you have developed a good understanding of .css files, change a few elements at a time and test your changes to make sure that the result is what you expect.
Subscribe to:
Posts (Atom)