使用 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.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.yyy-mm-dd 格式不需要 substr;它已經只返回您需要的 10 個字符。
回复:使用 Char 比較數字值和字符值非常感謝 - 我會試一試 