cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
%3CLINGO-SUB%20id%3D%22lingo-sub-779525%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E6%9C%89%E6%B2%A1%E6%9C%89%E5%8A%9E%E6%B3%95%E5%9C%A8%E6%A0%BC%E5%BC%8F%E6%A8%A1%E5%BC%8F%E4%B8%AD%E4%BD%BF%E7%94%A8%E4%B8%80%E5%B9%B4%E4%B8%AD%E7%9A%84%E7%AC%AC%E5%87%A0%E5%91%A8%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-779525%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E4%BA%B2%E7%88%B1%E7%9A%84%E7%A4%BE%E5%8C%BA%EF%BC%9A%3C%2FP%3E%3CP%3E%E6%88%91%E6%83%B3%E5%88%9B%E5%BB%BA%E4%B8%80%E4%B8%AA%E5%8C%85%E5%90%AB%E6%97%A5%E6%9C%9F%E5%91%A8%E6%95%B0%E7%9A%84%E5%AD%97%E7%AC%A6%E4%B8%B2%EF%BC%8C%3C%2FP%3E%3CP%3E%E6%98%AF%E5%90%A6%E5%8F%AF%E4%BB%A5%E4%BD%BF%E7%94%A8%E6%A0%BC%E5%BC%8F%E6%A8%A1%E5%BC%8F%E6%9D%A5%E5%AE%9E%E7%8E%B0%EF%BC%9F%3C%2FP%3E%3CP%3E%E5%BD%93%E7%84%B6%E6%88%91%E5%8F%AF%E4%BB%A5%E5%B0%86%E5%85%B6%E7%BB%84%E6%88%90%E4%B8%80%E4%B8%AA%E5%AD%97%E7%AC%A6%E4%B8%B2%EF%BC%8C%E4%BD%86%E6%88%91%E5%96%9C%E6%AC%A2%E4%BD%BF%E7%94%A8%E6%A0%BC%E5%BC%8F%E6%A8%A1%E5%BC%8F%E4%BB%A5%E7%B4%A7%E5%AF%86%E7%9A%84%E6%96%B9%E5%BC%8F%E8%BF%9B%E8%A1%8C%E3%80%82%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%E8%B0%A2%E8%B0%A2%EF%BC%8C%E5%B9%B6%E8%87%B4%E4%BB%A5%E6%9C%80%E8%AF%9A%E6%8C%9A%E7%9A%84%E9%97%AE%E5%80%99%EF%BC%8C%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(%201%20)%3B%0APrint(%20Format(%20Today()%2C%20%22Format%20Pattern%22%2C%20%22%3CYYYY%3E_%3CMM%3E%22%20)%20)%3B%0A%2F%2F%20Format%20Patern%20does%20not%20recognize%20WW%0APrint(%20Format(%20Today()%2C%20%22Format%20Pattern%22%2C%20%22%3CYYYY%3E_%3CWW%3E%22%20)%20)%3B%0A%0A%2F%2F%20this%20works%0APrint(%20Char(%20Year(%20Today()%20)%20)%20%7C%7C%20%22_%22%20%7C%7C%20Right(%20%220%22%20%7C%7C%20Char(%20Week%20Of%20Year(%20Today()%20)%20)%2C%202%20)%20)%3B%3C%2FWW%3E%3C%2FYYYY%3E%3C%2FMM%3E%3C%2FYYYY%3E%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-779525%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3E%E8%87%AA%E5%8A%A8%E5%8C%96%E5%92%8C%E8%84%9A%E6%9C%AC%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3E%E5%9F%BA%E7%A1%80%E6%95%B0%E6%8D%AE%E5%88%86%E6%9E%90%E4%B8%8E%E5%BB%BA%E6%A8%A1%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-779547%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E6%9C%89%E6%B2%A1%E6%9C%89%E5%8A%9E%E6%B3%95%E5%9C%A8%E6%A0%BC%E5%BC%8F%E6%A8%A1%E5%BC%8F%E4%B8%AD%E4%BD%BF%E7%94%A8%E4%B8%80%E5%B9%B4%E4%B8%AD%E7%9A%84%E7%AC%AC%E5%87%A0%E5%91%A8%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-779547%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22txnelson_0-1722943988604.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22txnelson_0-1722943988604.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22txnelson_0-1722943988604.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22txnelson_0-1722943988604.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F66870i592D4C92F0F7FAA2%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22txnelson_0-1722943988604.png%22%20alt%3D%22txnelson_0-1722943988604.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(%201%20)%3B%0APrint(%20Format(%20Today()%2C%20%22Format%20Pattern%22%2C%20%22%3CYYYY%3E_%3CMM%3E%22%20)%20)%3B%0A%2F%2F%20Format%20Patern%20does%20not%20recognize%20WW%0APrint(%20Format(%20Today()%2C%20%22Format%20Pattern%22%2C%20%22%3CYYYY%3E_%3CWW1%3E%22%20)%20)%3B%3C%2FWW1%3E%3C%2FYYYY%3E%3C%2FMM%3E%3C%2FYYYY%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%E2%80%9C2024_08%E2%80%9D%3CBR%20%2F%3E%20%E2%80%9C2024_32%E2%80%9D%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-779550%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E6%9C%89%E6%B2%A1%E6%9C%89%E5%8A%9E%E6%B3%95%E5%9C%A8%E6%A0%BC%E5%BC%8F%E6%A8%A1%E5%BC%8F%E4%B8%AD%E4%BD%BF%E7%94%A8%E4%B8%80%E5%B9%B4%E4%B8%AD%E7%9A%84%E7%AC%AC%E5%87%A0%E5%91%A8%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-779550%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E4%B8%87%E5%88%86%E6%84%9F%E8%B0%A2%EF%BC%81%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-779618%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E6%9C%89%E6%B2%A1%E6%9C%89%E5%8A%9E%E6%B3%95%E5%9C%A8%E6%A0%BC%E5%BC%8F%E6%A8%A1%E5%BC%8F%E4%B8%AD%E4%BD%BF%E7%94%A8%E4%B8%80%E5%B9%B4%E4%B8%AD%E7%9A%84%E7%AC%AC%E5%87%A0%E5%91%A8%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-779618%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EISO%20%E5%91%A8%20(%20%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3Eww%3C%2FFONT%3E%20)%20%E4%B9%9F%E9%9D%9E%E5%B8%B8%E6%9C%89%E7%94%A8%E3%80%82%E8%AF%B7%E8%AE%B0%E4%BD%8F%EF%BC%8C%E5%AE%83%E5%8F%AA%E8%83%BD%E4%B8%8E%20ISO%20%E5%B9%B4%E4%BB%BD%20(%20%3CFONT%20face%3D%22courier%20new%2Ccourier%22%3Eyyyy%3C%2FFONT%3E%20)%20%E7%BB%93%E5%90%88%E4%BD%BF%E7%94%A8%E3%80%82%3CBR%20%2F%3E%E4%B8%8D%E5%B9%B8%E7%9A%84%E6%98%AF%EF%BC%8CGraph%20Builder%20%E4%B8%AD%E7%9A%84%E8%BF%99%E7%A7%8D%E6%97%B6%E9%97%B4%E6%A0%BC%E5%BC%8F%E5%AD%98%E5%9C%A8%E9%97%AE%E9%A2%98%20-%20%E7%BC%BA%E5%B0%91%202023%20%E5%B9%B4%EF%BC%9A%3CBR%20%2F%3E%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2FDiscussions%2FTime-binning-how-to-change-the-Tick-labels%2Fm-p%2F762929%2Fhighlight%2Ftrue%23M94343%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.jmp.com%2Ft5%2FDiscussions%2FTime-binning-how-to-change-the-Tick-labels%2Fmp%2F762929%2Fhighlight%2Ftrue%23M94343%3C%2FA%3E%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22hogi_0-1722957136975.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22hogi_0-1722957136975.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F66877iB282206CA8352DCB%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22hogi_0-1722957136975.png%22%20alt%3D%22hogi_0-1722957136975.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
Georg
Level VII

Is there a way to uses Week of the year in Format Patterns?

Dear Community,

I want to make a string containing the week of a date,

is it possible to do so with Format Patterns?

Of course I could compose as a string, but I like the tight way doing it with Format Patterns.

 

Thanks and best regards,

 

 

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 ) );
Georg
1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Is there a way to uses Week of the year in Format Patterns?

txnelson_0-1722943988604.png

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>" ) );

"2024_08"
"2024_32"

Jim

View solution in original post

3 REPLIES 3
txnelson
Super User

Re: Is there a way to uses Week of the year in Format Patterns?

txnelson_0-1722943988604.png

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>" ) );

"2024_08"
"2024_32"

Jim
Georg
Level VII

Re: Is there a way to uses Week of the year in Format Patterns?

great - Thanks!

Georg
hogi
Level XII

Re: Is there a way to uses Week of the year in Format Patterns?

Iso week (ww) is also very helpful. Keep in mind that it can just be used in combination with ISO year (yyyy).
Unfortunately, there is an issue in Graph Builder with this time format - year 2023 is missing:
https://community.jmp.com/t5/Discussions/Time-binning-how-to-change-the-Tick-labels/m-p/762929/highl... 

 

hogi_0-1722957136975.png