Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想制作一个 Alteryx 最终用户提示,允许他在数据行中输入日期。诀窍是只接受以下格式的月份的第一天:
“mm/d/yyyy”(2017 年 1 月 1 日、2018 年 12 月 1 日)
不幸的是,每当我输入文本或其他格式(JAN-1-2016 等)时,警告提示都会接受它并将值输入行。
IsEmpty([#1]) or IIF(regex_match([#1],"(0[1-9]|1[0-2])\/([1-9]|[12]\d|3[01])\/[12]\d{3}"),1,0)
好的,我修改了正则表达式并在 IIF 结束时将 1 与 0 交换。这将强制最终用户以一种格式仅输入月份的第一天:mm/d/yyyy
IsEmpty([#1]) or IIF(regex_match([#1],"(0[1-9]|1[0-2])\/([1]|[12]\d|3[01])\/[12]\d{3}"),0,1)