使用 Char 比较数值和字符值你好,
是否可以比较数字值和字符值?
我想比较两列(相同或不同的值)。 一列有一个数字日期,一列有一个字符日期,因为我只需要比较它的一部分,所以我想使用子字符串。 下面的脚本运行了,但它没有给我正确的结果,因为所有的看起来都不一样(事实并非如此)。 我使用 Char 错了吗?
If( Substr( Char( :Name( "Date/Time of Specimen Collection" ) ), 1, 10 ) == Substr( :Name( "Start Date/Time of Visit" ), 1, 10 ),
"identical",
"different"
)
我知道我可以更改“标本采集日期/时间”的格式,但我不想这样做,因为它会使脚本的其他部分复杂化。
提前致谢
脚本回复:使用 Char 比较数字值和字符值要了解发生了什么,请创建一个临时专栏
Char( :Name( "Date/Time of Specimen Collection" ) )
作为公式。 您可能需要使用 format(...) 函数(而不是 char(...))来指定准确的日期时间格式,您需要这些格式才能正确获取所有值和分隔符。 当您使用列属性对话框并查看格式...日期部分时,您可以看到可用的格式名称。
回复:使用 Char 比较数字值和字符值我明白你的意思。 不过,我似乎无法正确使用格式。
有没有办法在不创建额外列的情况下这样做?
回复:使用 Char 比较数字值和字符值是的。 字符日期的格式是什么?
回复:使用 Char 比较数字值和字符值在附表截图中,我试图将“标本采集日期/时间”列(数字,yyy-mm-ddThh:mm:ss)的日期部分与“访问开始日期/时间”列(字符, 名义上)
是否有一个函数允许 jmp 将数值视为字符(当然是格式化为日期),以便我可以使用子字符串作为它的日期部分?
回复:使用 Char 比较数字值和字符值
Using the format() function; the numeric date is in year-month-day for 7 February; the character format is in day/month/year.Using the format() function; the numeric date is in year-month-day for 7 February; the character format is in day/month/year.Using the format() function; the numeric date is in year-month-day for 7 February; the character format is in day/month/year.Using the format() function; the numeric date is in year-month-day for 7 February; the character format is in day/month/year.Using the format() function; the numeric date is in year-month-day for 7 February; the character format is in day/month/year.Using the format() function; the numeric date is in year-month-day for 7 February; the character format is in day/month/year.Using the format() function; the numeric date is in year-month-day for 7 February; the character format is in day/month/year.Using the format() function; the numeric date is in year-month-day for 7 February; the character format is in day/month/year.Using the format() function; the numeric date is in year-month-day for 7 February; the character format is in day/month/year.Using the format() function; the numeric date is in year-month-day for 7 February; the character format is in day/month/year.Using the format() function; the numeric date is in year-month-day for 7 February; the character format is in day/month/year.Using the format() function; the numeric date is in year-month-day for 7 February; the character format is in day/month/year.Using the format() function; the numeric date is in year-month-day for 7 February; the character format is in day/month/year.Using the format() function; the numeric date is in year-month-day for 7 February; the character format is in day/month/year.Using the format() function; the numeric date is in year-month-day for 7 February; the character format is in day/month/year.Using the format() function; the numeric date is in year-month-day for 7 February; the character format is in day/month/year.Using the format() function; the numeric date is in year-month-day for 7 February; the character format is in day/month/year.Using the format() function; the numeric date is in year-month-day for 7 February; the character format is in day/month/year.Using the format() function; the numeric date is in year-month-day for 7 February; the character format is in day/month/year.Using the format() function; the numeric date is in year-month-day for 7 February; the character format is in day/month/year.使用 format() 函数;数字日期为 2 月 7 日的年月日;字符格式为日/月/年。
回复:使用 Char 比较数字值和字符值您可能需要这种格式:
the T format is an ISO standard.the T format is an ISO standard.the T format is an ISO standard.the T format is an ISO standard.the T format is an ISO standard.the T format is an ISO standard.the T format is an ISO standard.the T format is an ISO standard.the T format is an ISO standard.the T format is an ISO standard.the T format is an ISO standard.the T format is an ISO standard.the T format is an ISO standard.the T format is an ISO standard.T 格式是 ISO 标准。
回复:使用 Char 比较数字值和字符值甚至这样:
You don't need substr for the yyy-mm-dd format; it already returns just the 10 characters you need.You don't need substr for the yyy-mm-dd format; it already returns just the 10 characters you need.You don't need substr for the yyy-mm-dd format; it already returns just the 10 characters you need.You don't need substr for the yyy-mm-dd format; it already returns just the 10 characters you need.You don't need substr for the yyy-mm-dd format; it already returns just the 10 characters you need.You don't need substr for the yyy-mm-dd format; it already returns just the 10 characters you need.You don't need substr for the yyy-mm-dd format; it already returns just the 10 characters you need.yyy-mm-dd 格式不需要 substr;它已经只返回您需要的 10 个字符。
回复:使用 Char 比较数字值和字符值非常感谢 - 我会试一试 