问题
I am trying to create something that will populate the day of the week in one cell based on a date entered in another, BUT in Master Data Services. I know I will need to do this in a business rule and apply it to the attributes. I am wondering if this can be don using REGEX patterns or any other clever method. So, for example if I have a column with 12/21/2016 in it, I want the next column to say "Wednesday". Thanks!
回答1:
The simplest way would be using sql and use a calculated column or directly in a view. I'm not that familiar with MDS so there might be a better solution (or not even possible).
alter table mytable add weekday as DATENAME(dw,fieldname) persisted
Do never try to do your own date/time functions, you will fail
来源:https://stackoverflow.com/questions/41273707/how-to-use-regex-patterns-to-return-day-of-the-week-if-a-date-is-entered