Category Archives: OS

SSRS – Format() and FormateDateTime()

Found this reference … JUST IN TIME!

Thanks Thavash This is by far my most visited page.

http://thavash.spaces.live.com/blog/cns!CF6232111374DFD2!155.entry

April 10

Working with Dates in Reporting Services

As with any other technology ( eg. SQL , C# ), you always find people running into problems with processing of dates. I was asked today , “How to I format dates when using the Date Picker and sending it through to a stored procedure” ? Let’s have a look ….
1) The FormatDateTime command
This is pretty easy to use, but maybe a bit limiting. You can specify 1 of 4 formats using the command arguments. Let’s say we have selected a date such as 10th April 2007 , our results will be as follows :
Command Result
FormatDateTime(Parameters!Date.Value,1) Tuesday, April 10, 2007
FormatDateTime(Parameters!Date.Value,2) 4/10/2007
FormatDateTime(Parameters!Date.Value,3) 12:00:00 AM
FormatDateTime(Parameters!Date.Value,4) 00:00

…but the better way to do it would be to use …

2) The Format command and specify the exact format you require. For example…

Command Result
Format(Parameters!Date.Value,”dd-MM-yyyy”) 10-04-2007
Format(Parameters!Date.Value,”dd/MM/yyyy”) 10/04/2007
Format(Parameters!Date.Value,”MMM-dd-yyyy”) Apr-10-2007
Format(Parameters!Date.Value,”MMM-dd-yy”) Apr-10-07

So 3 M’s give you “Apr” ….anyway this is quite useful if you’re looking for Day/Month/Year , since the system will default to MM/DD/YYYY.

Using this you should be able to display the date format you want , or send through a particular format to a Stored Proc.

EDITED 22/08/2007 : If the Format Command doesn’t work , try converting the value to a date , eg.

Format(Cdate(Parameters!Date.Value),”dd-MM-yyyy”)

Instructables – Firefox Pranks

FROM INSTRUCTABLES
Read the Firefox Pranks! instructable by clicking here.

Using add-ons in Firefox to enhance your experience is boring. For April Fools’ Day, lets make the experience a little more bizarre.

Since these add-ons were meant to be installed on a victim’s computer you’ll only need two things:

– a victim who uses Firefox as his or her regular browser
– access to the victim’s computer
Read more »

C# – Calculating Distance between Zipcodes

Calculating the distance between ZIP codes has become a common feature in search engines. For instance, if you’re searching for restaurants, a Web site will often allow you to enter a ZIP code and display all of the restaurants within X miles of that ZIP code. Here is one way application developers to implement a ZIP code distance calculator using the .NET Framework and C#.

This article uses a derivation of the Haversine formula to calculate the distance between ZIP codes. The Haversine formula is used to determine the distance between two points on a sphere – in this case the earth. While this isn’t 100 percent accurate due to the earth not being a perfect sphere, it is probably as close as you’re going to get without getting out the tape measure!

Author: Zach Smith
Find TechRepublic Article Here.

Formula for techrepublic for Zipcode calculation of distances

Download PDF and Code Here

Designing RedditRiver.com Website

Peteris Krumins walks you through a tutorial for the building of a plain text version of Reddit.com using Python. Great step-by step and how-to!

read more

What Does Wine 1.0 Mean for Business?

Wine 1.0 promises to finally allow Linux users to run thousands of Windows apps..
Nice Article that starts out with a shout-out to Duke nukem!

read more