How to change the date format on SSAS 2012 - sql-server

I have deployed an SQL Server 2012 on a Windows Server en-us.
Now my dates on Analysis services are in the American format (MM/dd/yyyy). the company is not American, therefore I would like to change it to yyyy-MM-dd or dd-MM-yyyy, how can i do it?
Everything seems to be properly configured, however, SSAS is refusing to output the dates in the desired format :(
On excel:
On cube browsing:
On dimension browsing:
Dimension seems to be properly configured on SSAS:
Query on SQL Database engine:
SSAS properties
SQL Server Database engine properties
Windows server regional settings

A few month ago i was enduring the same problem with the date, i thought the issue was comming from SSAS but i was wrong...
So i totally changed my dimension table with a new table containing all date format, so now i can use any format that i want...
You can find how to create it in this link:
http://www.codeproject.com/Articles/647950/Create-and-Populate-Date-Dimension-for-Data-Wareho

I did have similar problem - checked all 3 environment DEV/UAT/PROD - no difference at all - however, DEV and UAT giving the Date in correct format (yyyy-mm-dd)- but PROD was in US format - tried everything, but still PROD showing in US format. Next, I reprocessed and deployed the cube from Visual Studio. Once it is completed i.e deployed to PROD - Date was in correct format - ie in yyyy-mm-dd.

Related

text column convert to date for visual studio graph

I am writing a clickonce application in vb.net. I have sql tables linked to a Microsoft Access database, and then my application reads through the OLEDB connection.
My columns in SQL are saved as date however when linked to MS Access they convert to "text" I haven't had any issues with this until I started creating charts on my application. I need the dates on the chart to display as jan 17 feb 17 etc however no matter what formatting I use they come back as '2017-01-01' '2017-02-01'
I have tried
ChartFCR.Series(0).XValueType = DataVisualization.Charting.ChartValueType.DateTime
ChartFCR.ChartAreas(0).AxisX.LabelStyle.Format = "MMMyy"
in various forms and nothing is changing the appearance. any information or suggestion is helpful.
Thanks
The only way Access will make sense of a SQL date data type is if it is converted into 1) a datetime in SQL or 2) a date in Access.
Of course it depends on your situation, but try creating a query in Access that handles that conversion and base the chart on the query. That would give you the most control for the Access interface.

Oracle to SQL server Migration Date Format changes

I Used SELECT TO_CHAR(sysDate,'dy') FROM DUAL In oracle and I want to get the same output in SQL Server. I tried several ways and I want to know the date style value for this format.
CONVERT(VARCHAR(max),'2017-03-06T00:00:00.000',<DateStyle>)

SSAS OLAP Cube Output Date Format mm/dd/yy to yyyy-MM-dd

I have deployed an SQL Server 2012 on a Windows Server en-us.
Now my dates on Analysis services are in this format MM/dd/yyyy. the company is not American, therefore I would like to change it to yyyy-MM-dd.
Everything seems to be properly configured, however, SSAS is refusing to output the dates in the desired format.
Query on SQL Database engine
Windows Server Regional Settings
an easy and fast way is to create a computed column on DimDate in SSMS, and specify this a name value for your datekey. Let me if that works.
ALTER TABLE [Dim].[Date] ADD AlternateDateFormat AS convert(date,[FullDate], 111);

rails - activerecord-sqlserver-adapter - sql server not recognizing dates

Rails 3.2.1
I'm using SQL Server 2008 with the sqlserver rails plugin (rails-sqlserver/activerecord-sqlserver-adapter # github)
When I save records they fail because TinyTDS can't parse the date (2006-09-13 10:00:00 -0400, created_at, updated_at) (I think mssql needs the offset in the format of -hh:mm).
I get a similar result when I run the query directly in sql server. It works in sql server if I make the data type 'datetimeoffset' but I have almost 100 tables and... well I don't really want to make that manual change to all of those tables.
How can I get rails to migrate the tables with the proper date format and get it to write dates in a format that mssql will accept?

SSIS converts .csv date field to incorrect format on production SQL server

I am using SSIS 2005 to read data off a .csv file into a SQL Server 2005 Database. I am using a Flat File connection manager for the .csv and an OLEDB Connection Manager for the resulting rows.
The .csv file contains a field which is a date in UK format (dd/mm/yyyy), which may be written, say, 7/3/2011 for 7th March 2011. This column is then mapped onto the equivalent datetime field in the SQL Server database.
The problem I am facing is that, while everything works fine on the development machine, when used on the production environment, the dates get changed to US (mm/dd/yyyy) format (if valid), when they are inserted into SQL Server. Is there some place where the desired Region/Format (in this case UK) for the destination datetime field can be specified, maybe somewhere in the package or some setting on the production server itself?
Thanks in advance,
Tim
You can set the locale in the Flat File Connection Manager Editor or LocaleID in the Properties box for the connection (same thing). Setting it to "English (United Kingdom)" will interpret the dates correctly, because SSIS uses the locale in the package or data flow, not the OS locale.
Note that you have to set the format at the source, not the destination: datetime is a binary format in MSSQL so dates aren't stored internally in a locale-specific format anyway.

Resources