Question: The query which i am using is 

```
        String sql=select trim(CdateTo) cdate,
        count(case when Verified = 'WithGrant' then 1 end) as grant,
        count(case when Verified = 'WithDiscount' then 1 end) as CC
        from mse where Verified IN ('WithDiscount','WithGrant') and 
        CdateTo > SYSDATE - 9 
        GROUP BY trim(CdateTo) 
        ORDER BY TO_DATE(cdate,'DD/MM/YYYY') 

```

and the spring jdbcTemplate code is like 

```
        try {
            return jdbcTemplate.query(sql, new RowMapper<Trif>() {
                @Override
                public Trif mapRow(ResultSet rs, int rowNum) throws SQLException {
                    Trif trif = new Trif();
                    *************some code*******
                    Trif.setDate(rs.getString("cdate"));
                    ***********someCode*********
                    return trif;
                }
            });
        } catch (DataAccessException e) {
            return null;
        }

```

this return me date like 31-MAY-16
where i want it should return me like 31-May-16 where the month May is showing first letter in capital and others are in small
 how i can acheive this?

Answer: 
Always use the following!!!

```
use strict;
use warnings qw( all );

```

It would have pointed out your error.

You modify the hash `%hash`, but there is no such hash! You want to modify the hash referenced by `$hash`, so you want

```
use Data::Dumper qw( Dumper );

sub f {
   my $hash = shift;
   $hash->{key} .= ' string';
}

my %hash = ( key => 'this is a' );
f(\%hash);
print(Dumper(\%hash));

```
You are presumably inside a subroutine and you are picking up a hash REFERENCE, not a hash. You need to dereference it like this:

```
%{$hashref}   # dereferenced hashref (just like a hash)

${$hashref}{key}  # access your key (just like a hash)

```

or:

```
$hashref->{key}  # access your key, shorthand style

```

Note the arrow in the shorthand version!

For more information, check out: 

```
perldoc perlreftut # MJD's references tutorial

```

(available on the web at <http://perldoc.perl.org/perlreftut.html>)