cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-340029%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%A0%E3%81%AE%E6%97%A5%E4%BB%98%2F%E3%82%B7%E3%83%95%E3%83%88%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6%E6%95%B0%E5%BC%8F%E5%88%97%E3%82%92%E4%BD%9C%E6%88%90%E3%81%99%E3%82%8B%E3%81%AB%E3%81%AF%E3%81%A9%E3%81%86%E3%81%99%E3%82%8C%E3%81%B0%E3%82%88%E3%81%84%E3%81%A7%E3%81%99%E3%81%8B%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-340029%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CP%3E%E7%A7%81%E3%81%AF%E5%8B%A4%E5%8B%99%E3%82%B7%E3%83%95%E3%83%88%E6%A7%8B%E9%80%A0%E3%81%AB%E9%96%A2%E3%81%99%E3%82%8B%E5%88%86%E6%9E%90%E3%81%AB%E5%8F%96%E3%82%8A%E7%B5%84%E3%82%93%E3%81%A7%E3%81%84%E3%81%BE%E3%81%99%E3%80%821%20%E3%82%B7%E3%83%95%E3%83%88%E3%81%82%E3%81%9F%E3%82%8A%2012%20%E6%99%82%E9%96%93%E5%8B%A4%E5%8B%99%E3%81%A7%E3%81%99%E3%80%82%E3%81%A4%E3%81%BE%E3%82%8A%E3%80%81%E5%8D%88%E5%89%8D%207%20%E6%99%82%E3%81%8B%E3%82%89%E5%8D%88%E5%BE%8C%207%20%E6%99%82%20(%E6%97%A5%E5%8B%A4%E3%80%81D)%20%E3%81%A8%E5%8D%88%E5%BE%8C%207%20%E6%99%82%E3%81%8B%E3%82%89%E5%8D%88%E5%89%8D%207%20%E6%99%82%20(%E5%A4%9C%E5%8B%A4%E3%80%81N)%20%E3%81%BE%E3%81%A7%E5%8B%A4%E5%8B%99%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%E7%8F%BE%E5%9C%A8%E3%80%81%E6%AC%A1%E3%81%AE%E3%82%88%E3%81%86%E3%81%AA%E6%95%B0%E5%BC%8F%E5%88%97%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%E3%81%8C%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%22WW%22%20%7C%7C%20Char%20(Week%20of%20Year%20(%3Adate))%20%7C%7C%20%22.%22%20%7C%7C%20Char%20(Day%20of%20week%20(%3Adate)%20-%201)%20%7C%7C%20%0AIf%20(Hour%20(%3Adate)%20%26lt%3B%3D%2019%20%26amp%3B%20Hour(%3Adate)%20%26gt%3B%3D%207%2C%20%22D%22%2C%20%22N%22)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E3%81%93%E3%81%AE%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%E3%81%AB%E5%9F%BA%E3%81%A5%E3%81%84%E3%81%A6%20bcs%20%E3%81%8C%E6%9C%9F%E5%BE%85%E3%81%97%E3%81%9F%E3%82%88%E3%81%86%E3%81%AB%E6%A9%9F%E8%83%BD%E3%81%97%E3%81%AA%E3%81%84%E3%82%88%E3%81%86%E3%81%A7%E3%81%99%E3%80%82%E6%99%82%E9%96%93%E3%81%8C%E5%8D%88%E5%89%8D%2012%20%E6%99%82%E3%81%AB%E3%81%AA%E3%82%8B%E3%81%A8%E5%B8%B8%E3%81%AB%E6%96%B0%E3%81%97%E3%81%84%E6%97%A5%E3%81%AB%E5%A4%89%E3%82%8F%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%E4%BE%8B%E3%81%88%E3%81%B0%EF%BC%9A%3C%2FP%3E%3CP%3E%E3%81%93%E3%81%AE%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%E3%81%AF%E3%80%8112%2F01%2F2020%205%3A49%3A47%20AM%20%E3%82%92%20WW49.2N%20%E3%81%AB%E5%A4%89%E6%8F%9B%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%E3%81%93%E3%82%8C%E3%81%AF%20WW49.1N%20%E3%81%A7%E3%81%82%E3%82%8B%E5%BF%85%E8%A6%81%E3%81%8C%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82WW49.2D%20%E3%81%AF%E3%80%81%E6%97%A5%E4%BB%98%E3%81%A8%E6%99%82%E5%88%BB%E3%81%8C%2012%2F01%2F2020%207%3A00%3A00%20AM%20%E3%81%AE%E3%81%A8%E3%81%8D%E3%81%AB%E9%96%8B%E5%A7%8B%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%E3%81%93%E3%82%8C%E3%81%AF%E3%80%81%E5%A4%9C%E5%8B%A4%E3%81%AE%E6%99%82%E9%96%93%E3%81%8C%E5%8D%88%E5%BE%8C%207%20%E6%99%82%E3%81%8B%E3%82%89%E5%8D%88%E5%89%8D%207%20%E6%99%82%E3%81%BE%E3%81%A7%E3%81%A7%E3%81%82%E3%82%8B%E3%81%9F%E3%82%81%E3%81%A7%E3%81%99%E3%80%82%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%E3%82%92%E4%BD%9C%E6%88%90%E3%81%99%E3%82%8B%E5%88%A5%E3%81%AE%E6%96%B9%E6%B3%95%E3%82%92%E6%8F%90%E6%A1%88%E3%81%BE%E3%81%9F%E3%81%AF%E3%82%A2%E3%83%89%E3%83%90%E3%82%A4%E3%82%B9%E3%81%97%E3%81%A6%E3%82%82%E3%82%89%E3%81%88%E3%81%BE%E3%81%99%E3%81%8B%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-340029%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CLINGO-LABEL%3E%E9%AB%98%E5%BA%A6%E3%81%AA%E7%B5%B1%E8%A8%88%E3%83%A2%E3%83%87%E3%83%AA%E3%83%B3%E3%82%B0%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3E%E8%87%AA%E5%8B%95%E5%8C%96%E3%81%A8%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3E%E6%B6%88%E8%B2%BB%E8%80%85%E3%81%8A%E3%82%88%E3%81%B3%E5%B8%82%E5%A0%B4%E8%AA%BF%E6%9F%BB%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3E%E5%AE%9F%E9%A8%93%E8%A8%88%E7%94%BB%E6%B3%95%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-340068%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%EF%BC%9A%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%A0%E3%81%AE%E6%97%A5%E4%BB%98%2F%E3%82%B7%E3%83%95%E3%83%88%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6%E6%95%B0%E5%BC%8F%E5%88%97%E3%82%92%E4%BD%9C%E6%88%90%E3%81%99%E3%82%8B%E3%81%AB%E3%81%AF%E3%81%A9%E3%81%86%E3%81%99%E3%82%8C%E3%81%B0%E3%82%88%E3%81%84%E3%81%A7%E3%81%99%E3%81%8B%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-340068%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E3%81%93%E3%82%8C%E3%82%92%E5%87%A6%E7%90%86%E3%81%99%E3%82%8B%E6%9C%80%E5%96%84%E3%81%AE%E6%96%B9%E6%B3%95%E3%81%AF%E3%80%817%E6%99%82%E9%96%93%E3%82%92%E5%B7%AE%E3%81%97%E5%BC%95%E3%81%84%E3%81%A6%E6%97%A5%E6%99%82%E3%81%AE%E5%80%A4%E3%82%92%E4%BF%AE%E6%AD%A3%E3%81%99%E3%82%8B%E3%81%93%E3%81%A8%E3%81%A7%E3%81%99%E3%80%82%E3%81%93%E3%82%8C%E3%81%AB%E3%82%88%E3%82%8A%E3%80%81%E3%82%B7%E3%83%95%E3%83%88%E3%81%8C%E6%97%A5%E3%81%AE%E5%80%A4%E3%81%A8%E4%B8%80%E8%87%B4%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EcorrectedDate%20%3D%20%3Adate%20-%20In%20Hours(%207%20)%3B%0A%22WW%22%20%7C%7C%20Char(%20Week%20Of%20Year(%20correctedDate%20)%20)%20%7C%7C%20%22.%22%20%7C%7C%20Char(%20Day%20Of%20Week(%20correctedDate%20)%20-%201%20)%20%7C%7C%0AIf(%20Hour(%20correctedDate%20)%20%26gt%3B%3D%200%20%26amp%3B%20Hour(%20correctedDate%20)%20%26lt%3B%3D%2012%2C%0A%20%22D%22%2C%0A%20%22N%22%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%0A%20%0A%20%0A%20%20%3CLINGO-SUB%20id%3D%22lingo-sub-882389%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%A0%E3%81%AE%E6%97%A5%E4%BB%98%2F%E3%82%B7%E3%83%95%E3%83%88%E3%82%92%E5%90%AB%E3%82%80%E6%95%B0%E5%BC%8F%E5%88%97%E3%82%92%E4%BD%9C%E6%88%90%E3%81%99%E3%82%8B%E3%81%AB%E3%81%AF%E3%81%A9%E3%81%86%E3%81%99%E3%82%8C%E3%81%B0%E3%82%88%E3%81%84%E3%81%A7%E3%81%99%E3%81%8B%3F%3C%2FLINGO-SUB%3E%0A%20%20%3CLINGO-BODY%20id%3D%22lingo-body-882389%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%0A%20%20%20%3CP%3E%E3%81%93%E3%82%8C%E3%81%AF%E8%88%88%E5%91%B3%E6%B7%B1%E3%81%84%E3%81%93%E3%81%A8%E3%81%A7%E3%81%99%E3%80%82%E3%81%AA%E3%81%9C%E3%81%AA%E3%82%89%E3%80%81%E6%95%B0%E5%BC%8F%E5%86%85%E3%81%AE%20%26gt%3B%3D%20%E3%81%A8%20%26lt%3B%20%E3%81%AE%E4%BD%8D%E7%BD%AE%E3%82%92%E5%85%A5%E3%82%8C%E6%9B%BF%E3%81%88%E3%82%8B%E3%81%93%E3%81%A8%E3%82%82%E3%81%A7%E3%81%8D%E3%82%8B%E3%81%8B%E3%82%89%E3%81%A7%E3%81%99%E3%80%82%3C%2FP%3E%20%0A%20%20%20%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EcorrectedDate%20%3D%20%3Adate%20-%20In%20Hours(%207%20)%3B%0A%22WW%22%20%7C%7C%20Char(%20Week%20Of%20Year(%20correctedDate%20)%20)%20%7C%7C%20%22.%22%20%7C%7C%20Char(%20Day%20Of%20Week(%20correctedDate%20)%20-%201%20)%20%7C%7C%0AIf(%200%20%26lt%3B%20Hour(%20correctedDate%20)%20%26lt%3B%3D%2012%2C%0A%09%22D%22%2C%0A%09%22N%22%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%20%0A%20%20%20%3CP%3E%E7%A7%81%E3%82%82%E4%BC%BC%E3%81%9F%E3%82%88%E3%81%86%E3%81%AA%E5%95%8F%E9%A1%8C%E3%81%AB%E5%8F%96%E3%82%8A%E7%B5%84%E3%82%93%E3%81%A7%E3%81%84%E3%81%BE%E3%81%99%E3%81%8C%E3%80%81%E5%A4%9C%E5%8B%A4%E3%81%A8%E6%98%BC%E5%8B%A4%E3%81%AE%E5%89%B2%E3%82%8A%E5%BD%93%E3%81%A6%E3%81%AF%E3%80%81if%E6%96%87%E3%81%AB%E3%81%8A%E3%81%91%E3%82%8B%26lt%3B%E3%81%A8%26lt%3B%3D%E8%A8%98%E5%8F%B7%E3%81%AE%E7%9B%B8%E5%AF%BE%E7%9A%84%E3%81%AA%E4%BD%8D%E7%BD%AE%E3%81%AB%E3%82%88%E3%81%A3%E3%81%A6%E8%8B%A5%E5%B9%B2%E7%95%B0%E3%81%AA%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82if%E6%96%87%E3%81%AE%E4%B8%AD%E3%81%A7%E3%82%BF%E3%82%A4%E3%83%A0%E3%82%B9%E3%82%BF%E3%83%B3%E3%83%97%E3%82%92%E7%9B%B4%E6%8E%A5%E4%BD%BF%E3%81%88%E3%82%8B%E3%82%88%E3%81%86%E3%81%AB%E3%81%A7%E3%81%8D%E3%82%8C%E3%81%B0%E7%B4%A0%E6%99%B4%E3%82%89%E3%81%97%E3%81%84%E3%81%A8%E6%80%9D%E3%81%84%E3%81%BE%E3%81%99%EF%BC%88if%20time%20%26gt%3B%2012%3A00%3A00%20...%EF%BC%89%E3%80%82%E3%82%82%E3%81%97%E3%81%8B%E3%81%97%E3%81%9F%E3%82%89%E3%81%A7%E3%81%8D%E3%82%8B%E3%81%8B%E3%82%82%E3%81%97%E3%82%8C%E3%81%BE%E3%81%9B%E3%82%93%E3%81%8C%E3%80%81%E3%81%BE%E3%81%A0%E5%8D%81%E5%88%86%E3%81%AB%E8%AA%BF%E3%81%B9%E3%81%A6%E3%81%84%E3%81%BE%E3%81%9B%E3%82%93%E3%80%82%3C%2FP%3E%20%0A%20%20%20%3CP%3E%E3%81%97%E3%81%8B%E3%81%97%E3%80%81%E7%A7%81%E3%81%AE%E4%B8%BB%E3%81%AA%E7%96%91%E5%95%8F%E3%81%AF%E3%80%81%20%3CSTRONG%3E%E3%80%8C%26lt%3B%20%E8%A8%98%E5%8F%B7%E3%81%A8%20%26lt%3B%3D%20%E8%A8%98%E5%8F%B7%E3%82%92%E3%81%A9%E3%81%93%E3%81%AB%E7%BD%AE%E3%81%8F%E3%81%8B%E3%82%92%E3%81%A9%E3%81%AE%E3%82%88%E3%81%86%E3%81%AB%E6%B1%BA%E3%82%81%E3%81%9F%E3%81%AE%E3%81%8B%E3%80%8D%E3%81%A8%E3%81%84%E3%81%86%E3%81%93%E3%81%A8%E3%81%A7%E3%81%99%E3%80%82%3C%2FSTRONG%3E%E5%BD%93%E7%84%B6%E3%81%AE%E3%81%93%E3%81%A8%E3%81%AA%E3%81%8C%E3%82%89%E3%80%81%E3%82%B7%E3%83%95%E3%83%88%E3%81%94%E3%81%A8%E3%81%AB%2012%20%E6%99%82%E9%96%93%E3%82%92%E5%9D%87%E7%AD%89%E3%81%AB%E5%88%86%E5%89%B2%E3%81%99%E3%82%8B%E3%81%93%E3%81%A8%E3%81%8C%E9%87%8D%E8%A6%81%E3%81%A7%E3%81%99%E3%81%8C%E3%80%81%E3%81%93%E3%82%8C%E3%81%AF%E3%81%A9%E3%81%A1%E3%82%89%E3%81%AE%E6%A7%8B%E6%88%90%E3%81%A7%E3%82%82%E5%AE%9F%E7%8F%BE%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%99%20(%26lt%3B%20%E3%82%92%20%26lt%3B%3D%20%E3%81%AE%E5%89%8D%E3%81%AB%E3%80%81%26lt%3B%3D%20%E3%82%92%20%26lt%3B%20%E3%81%AE%E5%89%8D%E3%81%AB)%E3%80%82%3C%2FP%3E%0A%20%20%3C%2FLINGO-BODY%3E%0A%20%0A%20%0A%20%20%3CLINGO-SUB%20id%3D%22lingo-sub-882401%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%A0%E3%81%AE%E6%97%A5%E4%BB%98%2F%E3%82%B7%E3%83%95%E3%83%88%E3%82%92%E5%90%AB%E3%82%80%E6%95%B0%E5%BC%8F%E5%88%97%E3%82%92%E4%BD%9C%E6%88%90%E3%81%99%E3%82%8B%E3%81%AB%E3%81%AF%E3%81%A9%E3%81%86%E3%81%99%E3%82%8C%E3%81%B0%E3%82%88%E3%81%84%E3%81%A7%E3%81%99%E3%81%8B%3F%3C%2FLINGO-SUB%3E%0A%20%20%3CLINGO-BODY%20id%3D%22lingo-body-882401%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%0A%20%20%20%3CP%3E%E5%8D%88%E5%BE%8C%207%20%E6%99%82%E3%81%AF%E6%96%B0%E3%81%97%E3%81%84%E3%82%B7%E3%83%95%E3%83%88%E3%81%AE%E9%96%8B%E5%A7%8B%E6%99%82%E9%96%93%E3%81%A7%E3%80%81%E3%81%93%E3%82%8C%E3%81%AF%20hour()%2019%20%E3%81%A7%E3%81%99%E3%80%827%20%E6%99%82%E9%96%93%E3%81%AE%E3%82%AA%E3%83%95%E3%82%BB%E3%83%83%E3%83%88%E3%82%92%E5%8F%96%E3%81%A3%E3%81%A6%E3%81%84%E3%82%8B%E3%81%9F%E3%82%81%E3%80%81%E5%A4%9C%E5%8B%A4%E3%82%92%E9%96%8B%E5%A7%8B%E3%81%99%E3%82%8B%20Hour()%20%E5%80%A4%E3%81%AF%2019%20-%207%20%E3%81%A7%2012%20%E3%81%AB%E3%81%AA%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82%E6%AF%94%E8%BC%83%E3%81%8C%20%26lt%3B%3D%20%E3%81%AE%E5%A0%B4%E5%90%88%E3%80%81%E6%99%82%E9%96%93%E5%80%A4%E3%81%8C%E3%81%A1%E3%82%87%E3%81%86%E3%81%A9%2012%20%E3%81%A7%E3%81%82%E3%82%8C%E3%81%B0%E6%97%A5%E5%8B%A4%E3%81%A8%E3%81%BF%E3%81%AA%E3%81%95%E3%82%8C%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%0A%20%20%3C%2FLINGO-BODY%3E%0A%20%0A%20%0A%20%20%3CLINGO-SUB%20id%3D%22lingo-sub-882403%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%A0%E3%81%AE%E6%97%A5%E4%BB%98%2F%E3%82%B7%E3%83%95%E3%83%88%E3%82%92%E5%90%AB%E3%82%80%E6%95%B0%E5%BC%8F%E5%88%97%E3%82%92%E4%BD%9C%E6%88%90%E3%81%99%E3%82%8B%E3%81%AB%E3%81%AF%E3%81%A9%E3%81%86%E3%81%99%E3%82%8C%E3%81%B0%E3%82%88%E3%81%84%E3%81%A7%E3%81%99%E3%81%8B%3F%3C%2FLINGO-SUB%3E%0A%20%20%3CLINGO-BODY%20id%3D%22lingo-body-882403%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%0A%20%20%20%3CP%3E%E3%81%82%E3%82%8A%E3%81%8C%E3%81%A8%E3%81%86%E3%81%94%E3%81%96%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%E5%BE%8C%E3%81%AB%E3%81%AA%E3%81%A3%E3%81%A6%E3%80%81%E8%87%AA%E5%88%86%E3%81%AE%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%92%E3%81%84%E3%81%98%E3%81%A3%E3%81%A6%E3%81%84%E3%81%9F%E6%99%82%E3%81%AB%E6%B0%97%E3%81%A5%E3%81%8D%E3%81%BE%E3%81%97%E3%81%9F%E3%80%82%E3%82%82%E3%81%A1%E3%82%8D%E3%82%93%E3%80%81%E3%81%82%E3%81%BE%E3%82%8A%E3%82%88%E3%81%8F%E8%80%83%E3%81%88%E3%81%A6%E3%81%84%E3%81%AA%E3%81%84%E8%B3%AA%E5%95%8F%E3%82%92%E6%8A%95%E7%A8%BF%E3%81%97%E3%81%9F%E5%BE%8C%E3%81%A7%E3%81%99%E3%80%82%E3%81%94%E8%BE%9B%E6%8A%B1%E3%81%84%E3%81%9F%E3%81%A0%E3%81%8D%E3%81%82%E3%82%8A%E3%81%8C%E3%81%A8%E3%81%86%E3%81%94%E3%81%96%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%0A%20%20%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
Danial1
Level II

How do I create a formula column with custom dates/shift?

I'm working on an analysis related to working shift strucutre. We operate 12 hours per shift. Meaning we work from 7am-7pm (Day shift, D) and 7pm - 7am (Night shift, N).

 

Currently I have a formula column script as follows:

"WW" || Char (Week of Year (:date)) || "." || Char (Day of week (:date) - 1) || 
If (Hour (:date) <= 19 & Hour(:date) >= 7, "D", "N")

Seems like it doesnt work the way I expected bcs based on this script, it changed to new day whenever the time reached 12am.

 

For example:

The script will convert 12/01/2020 5:49:47 AM to WW49.2N. It should be WW49.1N. WW49.2D starts when the date and time is 12/01/2020 7:00:00 AM This is because the time for night shift is from 7pm-7am. Can someone suggest or advise an alternative way to create the script?

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: How do I create a formula column with custom dates/shift?

Your shifts are from 7am-7pm D, and 7pm-7am N.   If a time for the 2nd day night shift is beyond 12 midnight, JMP will return the Day(:date) will return day 3, since JMP measures days based upon midnight.  However, if for the calculations, we shift the :date value back by 7 hours, that will mean that the night shift will be from noon to midnight, and never crossing the JMP day boundry. 

Jim

View solution in original post

8 REPLIES 8
txnelson
Super User

Re: How do I create a formula column with custom dates/shift?

I think the best way to handle this, is to do a correction on the date time values by subtracting off 7 hours, which makes the shifts line up with the day values

correctedDate = :date - In Hours( 7 );
"WW" || Char( Week Of Year( correctedDate ) ) || "." || Char( Day Of Week( correctedDate ) - 1 ) ||
If( Hour( correctedDate ) >= 0 & Hour( correctedDate ) <= 12,
	"D",
	"N"
);
Jim
Danial1
Level II

Re: How do I create a formula column with custom dates/shift?

just wanted to confirm, when you say - In Hours( 7 ) does it mean substrate 7 hours?

txnelson
Super User

Re: How do I create a formula column with custom dates/shift?

It subtracts 25200 seconds from the specified value for the column Date for the current row.
25200 = 60 seconds per minute X 60 minutes per hour X 7 hours

 

Also, I made a slight error in my formula.  The If() comparison should have a "<" comparison for the second element, not "<="

correctedDate = :date - In Hours( 7 );
"WW" || Char( Week Of Year( correctedDate ) ) || "." || Char( Day Of Week( correctedDate ) - 1 ) ||
If( Hour( correctedDate ) >= 0 & Hour( correctedDate ) < 12,
	"D",
	"N"
);
Jim
Danial1
Level II

Re: How do I create a formula column with custom dates/shift?

I see so jmp would always compute in seconds. btw @txnelson could you explain why we need to substract 7 hours (25,200 seconds) from the actual time?

The scripted condition says any time between 12am - 12pm is Day ("D")

txnelson
Super User

Re: How do I create a formula column with custom dates/shift?

Your shifts are from 7am-7pm D, and 7pm-7am N.   If a time for the 2nd day night shift is beyond 12 midnight, JMP will return the Day(:date) will return day 3, since JMP measures days based upon midnight.  However, if for the calculations, we shift the :date value back by 7 hours, that will mean that the night shift will be from noon to midnight, and never crossing the JMP day boundry. 

Jim
Ressel
Level VII

Re: How do I create a formula column with custom dates/shift?

This is interesting, since you could have swapped the positions of the >= and < in the formula:

correctedDate = :date - In Hours( 7 );
"WW" || Char( Week Of Year( correctedDate ) ) || "." || Char( Day Of Week( correctedDate ) - 1 ) ||
If( 0 < Hour( correctedDate ) <= 12,
	"D",
	"N"
);

I am working on a similar problem and the assignment of night vs day shift is slightly different, depending on which relative positions the < and <= symbols have in the if statement. It would be great to allow for direct use of timestamps inside the if formula (if time > 12:00:00 ...). Maybe it is, I haven't researched enough.

However, my main question: How did you decide where to put the < and <= symbols? Naturally, it is important to have an equal division of 12 hours per shift, but this could be achieved with both configurations (< before <=, and <= before <).

txnelson
Super User

Re: How do I create a formula column with custom dates/shift?

7PM is the start of the new shift which is hour() 19.  Since we are taking a 7 hour offset, the Hour() value that starts the night shift is 19-7 which is 12.  If the comparison was <= then a time value of exactly 12 would be considered a day shift.

Jim
Ressel
Level VII

Re: How do I create a formula column with custom dates/shift?

Thanks, I realized this later when tinkering with own file - naturally, after I had posted my not-so-well-thought-through question. Thank you for your patience.

Recommended Articles