I have a date dimesnion in universe which is of the format mm/dd/yyyy hh:mm:ss a, I’d like to convert the dimension to mm/dd/yyyy.
I use sql server as backend.
tried using Datepart(), is ther other function which gives me to mm/dd/yyyy
Doing that converts into a char type. I was looking to truncate the hrs min and seconds part of the date and keeping it as a date type only so that i can use them back in webi as a date field for prompts
This is an Oracle function where as he is using SQL Server. Unfortunatly, there is no direct equivalent to TRUNC() function within SQL Server . But there are ways this can be achieved. I did a little search and found the following link that might be of some help:
CAST(CAST(YEAR(vRequestReportSummary.RequestDate) AS VARCHAR(4)) + ‘/’ +
CAST(MONTH(vRequestReportSummary.RequestDate) AS VARCHAR(2)) + ‘/’ +
CAST(DAY(vRequestReportSummary.RequestDate) AS VARCHAR(2)) AS DATETIME)