Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date/Time datatypes 1

Status
Not open for further replies.

petperson

Programmer
Oct 2, 2002
106
US
Reading more about SQL Server, I discovered that there are only 2 datatypes to handle dates, smalldatetime and datetime - both of which store timestamps. I am confused however, how when displaying dates in RS, you only display the date portion of the field. Is this possible to do in RS?

again...thanks for your help
p.p.
 
Just use a format that doesn't include time

Whatever the date/time datatype, you can format it how you want so a date/time of 01/07/2005 10:00:04 formatted as dd/mm/yy would show as 01/07/05

It is only when it comes to calculations using these fields that the time element may cause issues

Rgds, Geoff

Three things are certain. Death, taxes and lost data. DPlank is to blame

Please read FAQ222-2244 before you ask a question
 
Are you trying to pull in a DateTime field from SQL that isn't displaying the full value or are you just trying to print a parameter that is only showing the Date part?



Catadmin - MCDBA, MCSA
"If a person is Microsoft Certified, does that mean that Microsoft pays the bills for the funny white jackets that tie in the back???
 
Actually we are populating a table in SQL server from an Oracle database. The date fields in Oracle do not have timestamps, but when I build the table in SQL server, it has a timestamp of 00:00:00 appended to the date. This timestamp displays in my report and I would like to display only the date portion.

p.p.
 
well read my post then. Just FORMAT the field in the report to not have the time part.

Rgds, Geoff

Three things are certain. Death, taxes and lost data. DPlank is to blame

Please read FAQ222-2244 before you ask a question
 
thank you xlbo, can you give me an example of the syntax?
 
In RS, each cell has a lot of properties.
One of those properties is the FORMAT of the cell

You just choose the format you want - d, dd, M, MM, MMM, MMMM, yy, yyyy - any combination of these

dd/MM/yyyy
dd-MM-yyyy

MMM-yyyy

yy-MMMM-dd

etc etc ad nauseum

must use M instead of m though as m is minutes, M is months

Rgds, Geoff

Three things are certain. Death, taxes and lost data. DPlank is to blame

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top