public static String getFormattedDateVal( CellHandle cell )
	{
		// assemble the formatting for the javascript.
		if( !cell.isDate() )
		{
			return "Not a Date";
		}
		if( Double.isNaN( cell.getDoubleVal() ) )
		{
			return "";    // 20060623 KSC
		}
		Date cal = DateConverter.getDateFromCell( cell );
		FormatHandle f = cell.getFormatHandle();
		int pat = f.getFormatPatternId();
		// SimpleDateFormat sdf = new SimpleDateFormat(); KSC: reuse

		switch( pat )
		{

			case 0xe:
				WorkBookHandle.simpledateformat.applyPattern( "MM/dd/yy" );
				return WorkBookHandle.simpledateformat.format( cal );

			case 0xf:
				WorkBookHandle.simpledateformat.applyPattern( "dd-MMM-yy" );
				return WorkBookHandle.simpledateformat.format( cal );

			case 0x10:
				WorkBookHandle.simpledateformat.applyPattern( "dd-MMM" );
				return WorkBookHandle.simpledateformat.format( cal );

			case 0x11:
				WorkBookHandle.simpledateformat.applyPattern( "MMM-yy" );
				return WorkBookHandle.simpledateformat.format( cal );

			case 0x16:
				WorkBookHandle.simpledateformat.applyPattern( "MM/dd/yy HH:mm" );
				return WorkBookHandle.simpledateformat.format( cal );

			default:
				WorkBookHandle.simpledateformat.applyPattern( "MM/dd/yyyy" );
				return WorkBookHandle.simpledateformat.format( cal );

		}
	}