Format SQL statements with HTML to look like SQL Server Management Studio

Have you ever tried to post a SQL statement in a blog or web page, but cannot figure out how to format it to look like it does in SQL Server Management Studio or Query Analyzer? Compare this statement: BACKUP DATABASE AdventureWorks TO DISK = ‘C:BackupsAdventureWorks.BAK’ To this one formatted to appear like SQL management […]

Display Today’s (Current) Date Dynamically in HTML Pages

The Easy Way <script language=”javascript”> <!– document.write(Date()); –> </script> The easy way provides date, time and timezone information. If you want to display the date only, the following way will do that. The Hard Way <script language=”javascript”> <!– Today = new Date(); TodayDay = Today.getDate(); TodayMon = Today.getMonth(); TodayYear = Today.getYear(); if (TodayYear < 2000) […]