親愛的社區,
我想製作一個包含日期的星期的字串,
是否可以使用格式模式來做到這一點?
當然,我可以將其編寫為字串,但我喜歡使用格式模式的緊湊方式。
謝謝並致以最誠摯的問候,
Names Default To Here( 1 );
Print( Format( Today(), "Format Pattern", "<YYYY>_<MM>" ) );
// Format Patern does not recognize WW
Print( Format( Today(), "Format Pattern", "<YYYY>_<WW>" ) );
// this works
Print( Char( Year( Today() ) ) || "_" || Right( "0" || Char( Week Of Year( Today() ) ), 2 ) );</WW></YYYY></MM></YYYY>

Names Default To Here( 1 );
Print( Format( Today(), "Format Pattern", "<YYYY>_<MM>" ) );
// Format Patern does not recognize WW
Print( Format( Today(), "Format Pattern", "<YYYY>_<WW1>" ) );</WW1></YYYY></MM></YYYY>
“2024_08”
“2024_32”
ISO week ( ww ) 也非常有幫助。請記住,它只能與 ISO 年份 ( yyyy ) 結合使用。
不幸的是,圖形產生器中的這種時間格式存在問題 - 缺少 2023 年:
https://community.jmp.com/t5/Discussions/Time-binning-how-to-change-the-Tick-labels/mp/762929/highlight/true#M94343
