DateFormat dateFormat = DateFormat .getDateInstance( DateFormat.SHORT ); Date resultDate; try { resultDate = dateFormat.parse( (String) source ); } catch ( ParseException e ) { dateFormat = DateFormat.getDateInstance( DateFormat.SHORT, Locale.US ); try { resultDate = dateFormat.parse( (String) source ); } catch ( ParseException e1 ) { throw new BirtException( ResourceConstants.CONVERT_FAILS, "Date", resourceBundle, e1 ); } } return resultDate;
return convertStringtoDate( (String) source );
	public static Date toDate( Object source ) throws BirtException	{		if ( source == null )			return null;		else if ( source instanceof Integer )		{			long longValue = ( (Integer) source ).longValue( );			return new Date( longValue );		}		else if ( source instanceof BigDecimal )		{			long longValue = ( (BigDecimal) source ).longValue( );			return new Date( longValue );		}		else if ( source instanceof Boolean )		{			throw new BirtException( ResourceConstants.CONVERT_FAILS, "Date",					resourceBundle );		}		else if ( source instanceof Date )		{			return new Date( ( (Date) source ).getTime( ) );		}		else if ( source instanceof Double )		{			long longValue = ( (Double) source ).longValue( );			return new Date( longValue );		}		else if ( source instanceof String )		{			DateFormat dateFormat = DateFormat					.getDateInstance( DateFormat.SHORT );			Date resultDate;			try			{				resultDate = dateFormat.parse( (String) source );			}			catch ( ParseException e )			{				dateFormat = DateFormat.getDateInstance( DateFormat.SHORT,						Locale.US );				try				{					resultDate = dateFormat.parse( (String) source );				}				catch ( ParseException e1 )				{					throw new BirtException( ResourceConstants.CONVERT_FAILS,							"Date", resourceBundle, e1 );				}			}			return resultDate;		}		else			throw new BirtException( ResourceConstants.CONVERT_FAILS, "Date",					resourceBundle );	}