ReportPortal
ReportPortal
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ReportPortal General Forum
 Report Portal General Issues
 Date Format in SQL Reports
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

conerneb

Ireland
2 Posts

Posted - 09/17/2008 :  10:10:38  Show Profile  Reply with Quote
Hi,
I have an SQL Report that returns a DateTime field from the database. When I query the table in Query Analyser the date format returned is 2007-03-06 07:22:12.227 (i.e. SQL standard DateTime format YYYY-MM-DD HH:MM:SS.SSS) - However when I run the query throught the ReportPortal I get the following returned 3/6/2007 7:22:12 AM.
I would prefer to keep the format I get from Query Analyser. Can this be resolved in ReportPortal or is it the servers date/time settings that need to be changed?

Different date formats are always a problem for me!!

I've had a search through this forum, but can't seem to find a solution to this problem!! Apologies if this has already been resolved!!

Thanks

Brian

admin

1645 Posts

Posted - 09/19/2008 :  10:36:03  Show Profile  Reply with Quote
Brian,
Please try to use the convert function. For example:

select convert(varchar, GetDate(),102)

The basic syntax is:

ANSI (yy.mm.dd) CONVERT(varchar,?,102)
British/French (dd/mm/yy) CONVERT(varchar,?,103)
German (dd.mm.yy) CONVERT(varchar,?,104)
Italian (dd-mm-yy) CONVERT(varchar,?,105)
USA (mm/dd/yy) CONVERT(varchar,?,101)
Go to Top of Page

conerneb

Ireland
2 Posts

Posted - 09/23/2008 :  00:36:37  Show Profile  Reply with Quote
I've managed to sort it out using that convert function

Thanks for that!

Cheers
Brian
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
ReportPortal © 2000-2002 Snitz Communications Go To Top Of Page