Archive for March, 2007

Find number of years, months and days between two dates using C#

Recently I ran into a situation where I had the start date and the end date and had to store the start date and the difference between the end and the start date (in terms of years, months, days) as string.

Here is a C# code to do that:

public static string DateDiff(DateTime startDate, DateTime endDate)
{
   string timeStr = string.Empty;
   int yr = 0;
   int mth = 0;
   int days = 0;

   TimeSpan ts = new TimeSpan();
   ts = endDate.Subtract(startDate);
   yr = (ts.Days/365);

   do
   {
       for(int i=0; i <= 12; i++)
       {
         if(endDate.Subtract(startDate.AddYears(yr).AddMonths(i)).Days > 0)
         {
             mth = i;
          }
          else
          {
             break;
          }
        }

        if(mth > 12)
           yr = yr + 1;
    }while(mth > 12);

    days = endDate.Subtract(startDate.AddYears(yr).AddMonths(mth)).Days;

    if(yr > 0)
                timeStr += yr.ToString() + “y”;
    if(mth > 0)
                timeStr += mth.ToString() + “m”;
    if(days > 0)
                timeStr += days.ToString() + “d”;

     return(timeStr);
}
How would you have done this?
Technorati tags: , , , , ,

Popularity: 4% [?]

Bookmark and Share: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • digg
  • DZone
  • Furl
  • Reddit
  • Spurl
  • Technorati
  • IndianPad
  • StumbleUpon

PracticeFusion : Free EMR Courtesy Google

Electronic Medical Records are deemed to be a big step in the direction of reducing healthcare costs and such systems tend to cost around $20,000 to install for a physician. But in comes Practice Fusion a San Francisco based startup that offers a web-based digital medical record system for free.

The service will generate revenue from Google Adsense advertisements. AS per the agreement, Google won’t have access to any patient data and the advertisers will get basic information about the physicians seeing their ads. The doctors have an option to opt out of advertisements by paying a monthly fees of $250.

Here are the challenges which their tool addresses:

  • Free: We do not charge licensing fees for our application, nor do we charge for hosting.
  • Integrated and Interoperable: Connecting physicians to other physicians, their patients, healthcare groups and RHIOs–delivering secure, shared patient information.
  • On-Demand: Our Solution is web-based requiring no software to implement and manage. Provisioning is a fraction of the time of client-server solutions.
  • One View: We provide unified, aggregated views into clinical data across the entire physician and patient community.

This would indeed be a cost-effective solution for small clinics and individual doctors but bigger organizations will adopt tools which work in-house so they have control over the data they generate.

Source (here)

Popularity: 5% [?]

Bookmark and Share: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • digg
  • DZone
  • Furl
  • Reddit
  • Spurl
  • Technorati
  • IndianPad
  • StumbleUpon

Gliffy : Create And Share Diagrams Online

Don’t have Visio to create your UML model/ network diagram/ flowchart, no problem, try Gliffy, a web-based diagram editor which supports rich diagramming capabilities right in your web browser. It is available for free.

Besides the rich drawing capabilities with support for Flowcharts, UML, Network Diagrams, User Interface, Floor Diagram, it also allows you to upload your own image and use it.

Read more »

Popularity: 6% [?]

Bookmark and Share: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • digg
  • DZone
  • Furl
  • Reddit
  • Spurl
  • Technorati
  • IndianPad
  • StumbleUpon

Collection of Firefox Wallpapers

Firefox has been generating waves and has been getting lot of acceptance within the user community. I am a Firefox fan and decided to look for Firefox wallpapers for my desktop. I decided to share my collection of Firefox wallpapers from various sites out here. The images link to the wallpapers on the site or the post on the sites from which I took them.

Here is the list (click on images to go to the site):

 

 

 

Popularity: 6% [?]

Bookmark and Share: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • digg
  • DZone
  • Furl
  • Reddit
  • Spurl
  • Technorati
  • IndianPad
  • StumbleUpon

Windows Explorer Tips For XP

Some useful settings for windows explorer on Windows XP:

  1. Launch Windows Explorer Shortcut: “Windows Key” + E
  2. Show full path in the address bar: Tools -> Folder Options -> View (Tab) -> check the checkbox “Display the full path in the address bar”
     
  3. Show extensions for files in the Explorer Window: Tools -> Folder Options -> View (Tab) -> Uncheck “Hide extensions for known file types”
  4. Show hidden files: Tools -> Folder Options -> View (Tab) -> Check “Show hidden files and folders”   
     

Popularity: 4% [?]

Bookmark and Share: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • digg
  • DZone
  • Furl
  • Reddit
  • Spurl
  • Technorati
  • IndianPad
  • StumbleUpon

Next Page »

Technology Blogs - Blog Top Sites Blog Flux Directory Blogarama - The Blog Directory BuzzBums Technology blogs Technology blogs blog search directory
Dreamsubmitting Directory Free Link Directory