Showing posts with label Excel. Show all posts
Showing posts with label Excel. Show all posts

Friday, December 2, 2011

Ascii Character as Symbols

I wanted to create a spreadsheet like this in Excel.



I figured I could use - and > for the right arrow to make it ->. But, what about the down arrow? Should I use a | and a V? That didn't feel good. So, I googled for "down arrow ascii" and it brought me to this page.
http://chexed.com/ComputerTips/asciicodes.php

This tells me I could use Alt-26 for the right arrow and Alt-25 for the down arrow. The results are for you to see. Nice. :)

Note: Use the number pad on the keyboard for the digits.

Friday, November 4, 2011

DateTime difference

In C#, if I have this
DateTime startedOn = DateTime.MinValue;
DateTime endedOn = DateTime.Now;
then
endedOn - startedOn is a valid expression that returns a TimeSpan with the difference between the 2 dates.

However, the same doesnt work in SQL Server. We need to use
DATEDIFF(s, startedOn, endedOn)
where s stands for seconds. So, if the 2 datetime values have a difference of 10 seconds and 1 minute, and if you expect 10, you are thinking Excel. The value returned here would be 70.

http://msdn.microsoft.com/en-us/library/ms174420.aspx