How do I change the date format from mm/dd/yyyy hh:mm"ss AM to mm/dd/yy

I am using a Reporting Services report but I cannot figure out how to change the date format to print mm/dd/yyyy Right now the date prints as mm/dd/yyyy hh:mm:ss AM

expertsexchangehunterAsked:
Who is Participating?
 
chapmandewCommented:
select ISNULL(convert(varchar(10), yourdatefield, 101), '')
from yourtablename
0
 
chapmandewCommented:
in tsql:

select convert(varchar(10), yourdatefield, 101)
from yourtablename
0
 
BrandonGalderisiCommented:
actually, 101 is mm/dd/yyyy,
1 is mm/dd/yy



select convert(varchar(10), getdate(),1)
select convert(varchar(10), getdate(),101)

But this would be, as chapmandew stated, a change in the SQL, not in the reporting services field.
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
chapmandewCommented:
>>I cannot figure out how to change the date format to print mm/dd/yyyy

I am pretty sure that is what the author asked for.  ;)
0
 
BrandonGalderisiCommented:
You're right.  I only saw the one in the title which was mm/dd/yy.  :)
0
 
expertsexchangehunterAuthor Commented:
I already have isNull(Issue.IDate, '') as IDate. If there is a way to use both IsNull and convert that would be great but I don'y know how.


0
 
brady1408Commented:
Just use ISNULL(select convert(varchar(10), yourdatefield, 101),'') Like the experts said
if the date is null the convert will return a null and your statement will still fork
0
 
brady1408Commented:
fork? I swear I typed in work, either way chapmandew already answered it :)
0
 
expertsexchangehunterAuthor Commented:
Even though there is a date in the field
select ISNULL(convert(varchar(10), yourdatefield, 101), '')
from yourtablename
returns a blank field
0
 
chapmandewCommented:
paste your date value on here.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.