Showing posts with label yyyyquot. Show all posts
Showing posts with label yyyyquot. Show all posts

Wednesday, March 21, 2012

Date manipulation

I need to to get the result of the function GETDATE and converted to a simpler "mm/dd/yyyy" format in order to compare the results to another date in a table. In ACCESS the function DATE returns the format of 'mm/dd/yyyy' since I need to work with date ranges without a need for this application 'HH:MM:SS'

I have try 'TRANSFORM(GETDATE,'mm/dd/yyyy') but I keep getting errors.

I am not sure what I am doing wrong? Any help is appreciated since I need to work in SQL Server 2000.

Gratefull

Neil

If you want to store the "tranformed date" in a datetime column, the hh,mm,ss will still be added to the column, although they might be NULL, depending on your operation you use for the transform, but if you want to simply minsert the transformed/converted date into a character column you can do the following:

SELECT CONVERT(VARCHAR(10),GETDATE(),1)

See the CONVERT function in the BOL for more information.

HTH, Jens SUessmeyer.


http://www.sqlserver2005.de

|||Thanks for your help Jens, I am still making the transition from ACCESS Functions to SQL Server and how to get similar results

Thursday, March 8, 2012

Date Format Problem

i have change my field like that format

= format(Fields!TimeStart.Value, "dd -MMM- yyyy")

Its working perfectly.Once i deployed my report this format is not working

once deploy my report its showing that field fill dd -MMM- yyyy why?there is no date in that field?

i dont understand can anybody know this one.

From the description it sounds like the TimeStart field is of type DateTime when running in preview (running based on the cached data from the .rdl.data file), but of type string when running on the report server when running against live data.

Are you running against the same data source in your design environment and the server?

Did you click the little green refresh icon in the preview toolbar (this will update the cached .rdl.data file kept by report designer)?

-- Robert

|||

thanx for your reply

its giving same problem.Its actually live data.Its giving once deploy my report only.