「5-4-4」会計カレンダーとして知られる、私の会社のOBSCURE会計カレンダーで、日付と時刻を特定の週または四半期に変換できる列式またはスクリプトを作成した人はいますか。 他の会計カレンダーへのグーグル参照を見ますが、どうやら5-4-4は珍しいです。
そのシステムについて私が理解していることから、特定の年の初めからの日数を見つけて、各四半期の日数と長さに基づいて週と四半期を計算することができます。53週間の年数を考慮する必要があるかもしれませんが、これで始めることができます。
New Table( "Fiscal Week",
Add Rows( 1000 ),
New Column( "Date", Numeric, "Continuous", Format( "yyyy-mm-ddThh:mm:ss", 19, 0 ),
Input Format( "yyyy-mm-ddThh:mm:ss", 0 ),
Formula( Date DMY( 4, 1, 2021 ) + Row() * In Hours( 12 ) )
),
New Column( "Fiscal Year", Numeric, "Continuous", Format( "Best", 12 ),
Formula(
Floor( (:Date - Date DMY( 4, 1, 2021 )) / In Days( 52 * 7 ) ) + 2021
)
),
New Column( "Fiscal Day of Year", Numeric, "Continuous", Format( "Best", 12 ),
Formula(
Floor( Mod( (:Date - Date DMY( 4, 1, 2021 )) / In Days( 1 ), 52 * 7 ) )
+ 1
),
Set Display Width( 67 )
),
New Column( "Fiscal Week of Year", Numeric, "Continuous", Format( "Best", 12 ),
Formula( Floor( (:Fiscal Day of Year - 1) / 7 ) + 1 ),
Set Display Width( 85 )
),
New Column( "Fiscal Quarter", Numeric, "Continuous", Format( "Best", 12 ),
Formula( Floor( (:Fiscal Week of Year - 1) / 13 ) + 1 ),
Set Display Width( 65 )
)
);それは53週間の年まで私を得るはずです、そしてそれからハルマゲドンが始まるのでそれは問題ではありません。 :>ありがとう