Tuesday, January 20, 2009

Converting Dates in SQL Server

 

image

SELECT 
   GETDATE() AS DefaultFormat,
   CONVERT(nvarchar(30), GETDATE(), 101) AS US,
   CONVERT(nvarchar(30), GETDATE(), 103) AS UK,
   CONVERT(nvarchar(30), GETDATE(), 111) AS Japan,
   CONVERT(nvarchar(30), GETDATE(), 104) AS German,
   CONVERT(nvarchar(30), GETDATE(), 112) AS ISO,
   CONVERT(nvarchar(30), GETDATE(), 109) AS Date_with_Milliseconds
 

image

Source

Friday, January 16, 2009

GridView Pager styling

Source

NY Mayor Michael Bloomberg talks about the conflict

Nettuts 960 CSS framework screencast



Source

JavaScript: Parent -> Frame function calls

For this example I have 2 html pages:

Page1.html and Page2.html

If Page2 is shown as iframe inside Page1 and has this function:

<script type="text/javascript">
        function showMessage(m) {
            document.getElementById("message").innerHTML = m;
        }
</script>

Than it can be called from Page1 like this:

<script type="text/javascript">
    window.onload = function() {
        window.frames[0].showMessage("Hello from Main Page in iFrame");
    };    
</script>

 

Source