時間フィールドの計算
967 ワード
DateやDateTimeでは 2/24というように24時間で割った値を使って時間を計算できます。
Time型では単純に + 2 とすれば2時間追加されると思ってましたが違う?
何?
もしかしてと思って
2 * 60 * 60
秒が7秒増えた。はぁ? ミリ秒か?
2 * 60 * 60 * 1000
正解です。 どうもミリ秒みたい。
IF( NOT(ISBLANK( Appointment_Time__c )),TIMEVALUE(Appointment_Time__c + ":00.000") + 2*60* 60 * 1000 , Null)
Converting TEXT field (managed package) into TIME format and adding 2 hours
Author And Source
この問題について(時間フィールドの計算), 我々は、より多くの情報をここで見つけました https://qiita.com/Keiji_otsubo/items/015cd4a9d7b7d1fa1fbd著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .