?
Solved

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

Posted on 2008-10-07
10
Medium Priority
?
895 Views
Last Modified: 2012-05-05
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

0
Comment
Question by:expertsexchangehunter
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
  • +1
10 Comments
 
LVL 60

Expert Comment

by:chapmandew
ID: 22663045
in tsql:

select convert(varchar(10), yourdatefield, 101)
from yourtablename
0
 
LVL 39

Expert Comment

by:BrandonGalderisi
ID: 22663108
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
 
LVL 60

Expert Comment

by:chapmandew
ID: 22663126
>>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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
LVL 39

Expert Comment

by:BrandonGalderisi
ID: 22663146
You're right.  I only saw the one in the title which was mm/dd/yy.  :)
0
 

Author Comment

by:expertsexchangehunter
ID: 22663161
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
 
LVL 60

Accepted Solution

by:
chapmandew earned 2000 total points
ID: 22663165
select ISNULL(convert(varchar(10), yourdatefield, 101), '')
from yourtablename
0
 
LVL 5

Expert Comment

by:brady1408
ID: 22663187
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
 
LVL 5

Expert Comment

by:brady1408
ID: 22663196
fork? I swear I typed in work, either way chapmandew already answered it :)
0
 

Author Comment

by:expertsexchangehunter
ID: 22663294
Even though there is a date in the field
select ISNULL(convert(varchar(10), yourdatefield, 101), '')
from yourtablename
returns a blank field
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 22663312
paste your date value on here.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
Hi, I am very much excited today since I'm going to share something very exciting Tool used for Analytical Reporting and that's nothing but MICROSTRATEGY. Actually there are lot of other tools available in the market for Reporting Such as Co…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question