ReportPortal
ReportPortal
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 ReportPortal General Forum
 Report Portal General Issues
 Date Format in SQL Reports

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Message:

* HTML is ON
* Forum Code is OFF
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
conerneb 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
2   L A T E S T    R E P L I E S    (Newest First)
conerneb Posted - 09/23/2008 : 00:36:37
I've managed to sort it out using that convert function

Thanks for that!

Cheers
Brian
admin 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)

ReportPortal © 2000-2002 Snitz Communications Go To Top Of Page