Author |
Topic  |
|
conerneb
Ireland
2 Posts |
Posted - 09/17/2008 : 10:10:38
|
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
|
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)
|
 |
|
conerneb
Ireland
2 Posts |
Posted - 09/23/2008 : 00:36:37
|
I've managed to sort it out using that convert function 
Thanks for that!
Cheers Brian
|
 |
|
|
Topic  |
|
|
|