Achievements

« Speaking at PASS Summit 2013! | Main | Working with Excel Destinations in SSIS - 0xC0202025, 0x80040E21 »
Tuesday
Feb262013

Converting Inches to Centimeters - Long Hand

Today I had to write a little function that takes the long had version of a fraction, say 8 3/4 and convert it a proper number (float) and then convert that number from inches to centimeters. While that is handy, I thought it would be best to include a few more variations on that theme.  It handles the following input scenarios:

  • Whole numbers -- '8'
  • Fractions alone -- '1/4'
  • Mixed Numbers -- '8 1/4','8-1/4','8.25','0.75','.75'
  • An invalid fraction -- 'Special',' eight and 1/4'

I'd list the code, but I haven't found a good way to embed formatted code into this website so instead I am linking the source code.

PrintView Printer Friendly Version

EmailEmail Article to Friend

References (86)

References allow you to track sources for this article, as well as articles that were written in response to this article.
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: Slendera Garcinia
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: musclemania
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: Buy rev test
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: ecigarettes
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: carcinia cambogia
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: Dragon City
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: buy rev test
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: logged in
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: detox diet
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: photolouvre.com
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: urlof.us
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: best hosting vps
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: Nuvo Cleanse
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: skin care regimen
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: muscle pain
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: Nutra Pump Review
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: skin care brands
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: Flawless Elite
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: Flawless Elite
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: garcinia cambogia
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: Max Light
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: www.miekloud.com
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: La Creme Review
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: Matrixyderm AM
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: Rock Hard
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: Juvesiio Review
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: balanced diet
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: testo xl
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: Edward Bass Films
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: universal tv stand
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: universal tv stand
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: Luxoderm
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: Universal Tv Stand
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: universal tv stand
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: windows vps server
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: Rejuvius Review
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: Cognitine Review
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: Ht Rush Reviews
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: Tentigo
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: Ageless Eyes
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: groupwise inc
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: Amercig
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Response: Goji Vita Reviews
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits
  • Response
    Converting Inches to Centimeters - Long Hand - Journal - SSIS - SQL Server Tidbits

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>