cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-226382%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3Echange%20date%20format%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-226382%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHi%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3BI%20received%20an%20.xlsx%20data%20sheet%20with%20the%20following%20date%20%22dd.mm.yy%22%20in%20a%20column%2C%20i.e.%20%2203.10.14%22.%3C%2FP%3E%3CP%3EAfter%20copying%20the%20data%20into%20JMP%20I%20created%20a%20new%20column%20to%20get%20the%20numeric%20number%20for%20the%20date%20and%20converted%20the%20date%20into%201.%20a%20numeric%20date%20type%20with%3C%2FP%3E%3CP%3E2.%20a%20ordinal%20modeling%20type%20and%3C%2FP%3E%3CP%3E3.%20format%20to%20%22yyyy-mm-dd%22.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHowever%2C%20some%20dates%20%2220.10.15%22%20do%20not%20appear%20in%20my%20new%20column.%20Is%20there%20a%20defnition%20conflict%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20advise%20how%20I%20can%20overcome%20this%20issue.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-227150%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20change%20date%20format%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-227150%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EI%20see%20the%20step%20that%20was%20needed%20to%20complete%20the%20conversion.%3CBR%20%2F%3EProblem%20solved.%20Thank%20you!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-227147%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20change%20date%20format%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-227147%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%3CSPAN%20style%3D%22display%3A%20inline%20!important%3B%20float%3A%20none%3B%20background-color%3A%20%23ffffff%3B%20color%3A%20%23333333%3B%20cursor%3A%20text%3B%20font-family%3A%20inherit%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3EYour%20issue%20is%20that%20you%20are%20reading%20the%20initial%20date%20field%20wrong.%26nbsp%3B%20The%20initial%20date%20field%20is%20in%20the%20format%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22background-color%3A%20%23ffffff%3B%20box-sizing%3A%20border-box%3B%20color%3A%20%23333333%3B%20display%3A%20inline%3B%20float%3A%20none%3B%20font-family%3A%20Arial%2CHelvetica%2Csans-serif%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.4%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E%22dd.mm.yy%22%20and%20you%20are%20%3C%2FSPAN%3Ereading%20it%20as%20if%20it%20is%20%22mm.dd.yy%22.%26nbsp%3B%20I%20have%20attached%20your%20data%20table%20where%20it%20can%20be%20seen%20that%20the%20numdate%20value%20does%20not%20match%20your%20newdate%20value.%26nbsp%3B%20In%20the%20data%20table%2C%20I%20have%20created%20a%20Character%20Date%20column%2C%20which%20uses%20a%20format()%20function%20in%20the%20formula%20to%20come%20up%20with%20the%20character%20value.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-227073%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20change%20date%20format%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-227073%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EThank%20you%20for%20your%20extended%20reply.%3C%2FP%3E%3CP%3EI%20worked%20on%20the%20data%20sheet%20and%20converted%20the%20%22character%20date%22%20into%20a%20numeric%20date%2C%20column%20%22numdate%22.%20Afterwards%20I%20covert%20the%20numberic%20date%20into%20the%20format%20I%20wanted%20it%20to%20be%2C%20column%20%22newdate%22.%20However%2C%20for%20some%20reason%20the%20new%20date%20does%20not%20show%20for%20some%20dates%20stated%20in%20the%20%22date%22%20column.%20Why%20does%20it%20not%20take%20certain%20dates%2C%20i.e.%2012.11.14%20and%20converts%20the%20numdate%20value%20into%20the%20new%20format%3F%3C%2FP%3E%3CP%3EI%20attached%20a%20jmp%20table%20with%20the%20data%20for%20you%20to%20actually%20see%20the%20data.%20I%20hope%20this%20could%20help%20solving%20the%20issue.%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance%2C%20Marc%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22%20language-jsl%22%3E%3CCODE%20class%3D%22%20%20language-jsl%22%3E%3CSPAN%20class%3D%22token%20function%22%3EDate%20DMY%3C%2FSPAN%3E%3CSPAN%20class%3D%22token%20punctuation%22%3E(%3C%2FSPAN%3E%0A%20%20%20%3CSPAN%20class%3D%22token%20function%22%3ENum%3C%2FSPAN%3E%3CSPAN%20class%3D%22token%20punctuation%22%3E(%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3ELeft%3C%2FSPAN%3E%3CSPAN%20class%3D%22token%20punctuation%22%3E(%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3EChar%3C%2FSPAN%3E%3CSPAN%20class%3D%22token%20punctuation%22%3E(%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20punctuation%22%3E%3A%3C%2FSPAN%3EDate%20%3CSPAN%20class%3D%22token%20punctuation%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22token%20punctuation%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20number%22%3E2%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20punctuation%22%3E)%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20punctuation%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22token%20punctuation%22%3E%2C%3C%2FSPAN%3E%0A%20%20%20%3CSPAN%20class%3D%22token%20function%22%3ENum%3C%2FSPAN%3E%3CSPAN%20class%3D%22token%20punctuation%22%3E(%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3ESubstr%3C%2FSPAN%3E%3CSPAN%20class%3D%22token%20punctuation%22%3E(%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3EChar%3C%2FSPAN%3E%3CSPAN%20class%3D%22token%20punctuation%22%3E(%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20punctuation%22%3E%3A%3C%2FSPAN%3EDate%20%3CSPAN%20class%3D%22token%20punctuation%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22token%20punctuation%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20number%22%3E4%3C%2FSPAN%3E%3CSPAN%20class%3D%22token%20punctuation%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20number%22%3E2%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20punctuation%22%3E)%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20punctuation%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22token%20punctuation%22%3E%2C%3C%2FSPAN%3E%0A%20%20%20%3CSPAN%20class%3D%22token%20function%22%3ENum%3C%2FSPAN%3E%3CSPAN%20class%3D%22token%20punctuation%22%3E(%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20string%22%3E%2220%22%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20operator%22%3E%7C%7C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3ERight%3C%2FSPAN%3E%3CSPAN%20class%3D%22token%20punctuation%22%3E(%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20function%22%3EChar%3C%2FSPAN%3E%3CSPAN%20class%3D%22token%20punctuation%22%3E(%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20punctuation%22%3E%3A%3C%2FSPAN%3EDate%20%3CSPAN%20class%3D%22token%20punctuation%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22token%20punctuation%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20number%22%3E2%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20punctuation%22%3E)%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22token%20punctuation%22%3E)%3C%2FSPAN%3E%0A%20%20%3CSPAN%20class%3D%22token%20punctuation%22%3E)%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-227041%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20change%20date%20format%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-227041%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EYour%20reponses%20and%20question%20appear%20to%20me%20that%20you%20are%20not%20understanding%20how%20JMP%20handles%20date%20values.%26nbsp%3B%20JMP%20handles%20dates%20and%20times%2C%20using%20a%20numeric%20value%20which%20is%20equal%20to%20the%20number%20of%20seconds%20since%20Midnight%2C%20January%201st%2C%201904.%26nbsp%3B%20The%20way%20that%20JMP%20converts%20this%20into%20one%20of%20the%20displays%20of%2009Feb2015%2C%20or%2002%2F09%2F2015%2C%20etc.%20is%20to%20set%20a%20JMP%20format%20on%20the%20column%20that%20has%20the%20numeric%20values.%3C%2FP%3E%0A%3CP%3ETherefore%2C%20if%20you%20have%20a%20character%20column%2C%20called%20%22Date%22%2C%20with%20the%20values%20like%20%2225.04.15%22%2C%20and%20you%20want%20to%20convert%20that%20into%20a%20JMP%20Date%20value%2C%20you%20can%20create%20a%20new%20column%20and%20if%20you%20apply%20the%20following%20formula%2C%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EDate%20DMY(%0A%20%20%20Num(%20Left(%20Char(%20%3ADate%20)%2C%202%20)%20)%2C%0A%20%20%20Num(%20Substr(%20Char(%20%3ADate%20)%2C%204%2C%202%20)%20)%2C%0A%20%20%20Num(%20%2220%22%20%7C%7C%20Right(%20Char(%20%3ADate%20)%2C%202%20)%20)%0A%20%20)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3Eit%20will%20take%20the%20character%20value%20of%26nbsp%3B%3CSPAN%20style%3D%22display%3A%20inline%20!important%3B%20float%3A%20none%3B%20background-color%3A%20%23ffffff%3B%20color%3A%20%23333333%3B%20cursor%3A%20text%3B%20font-family%3A%20inherit%3B%20font-size%3A%2016px%3B%20font-style%3A%20normal%3B%20font-variant%3A%20normal%3B%20font-weight%3A%20300%3B%20letter-spacing%3A%20normal%3B%20line-height%3A%201.7142%3B%20orphans%3A%202%3B%20text-align%3A%20left%3B%20text-decoration%3A%20none%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20-webkit-text-stroke-width%3A%200px%3B%20white-space%3A%20normal%3B%20word-spacing%3A%200px%3B%22%3E%2225.04.15%22%3C%2FSPAN%3E%20and%20convert%20it%20into%26nbsp%3B%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3E3512764800%3C%2FFONT%3E.%26nbsp%3B%20This%20is%20the%20number%20of%20seconds%20from%20Midnight%20January%201st%2C%201904%20until%20Midnight%2C%20April%2C%2025th%2C%202015.%26nbsp%3B%20Now%20what%20is%20missing%2C%20is%20that%20you%20don't%20want%20the%20data%20displayed%20in%20the%20number%20of%20seconds.%26nbsp%3B%20What%20you%20want%2C%20is%20for%20the%20value%20to%20be%20displayed%20in%20the%20data%20table%2C%20and%20on%20your%20reports%20in%202015-04-25.%26nbsp%3B%20To%20do%20this%2C%20you%20just%20set%20the%20format%20for%20the%20column%20to%20%22yyyy-mm-dd%22.%26nbsp%3B%20The%20advantage%20of%20storing%20dates%20in%20this%20numeric%20form%20is%20that%20one%20can%20then%20order%20the%20data%20by%20date%2C%20and%20can%20do%20addition%20and%20subtraction%20on%20the%20values%2C%20or%20even%20calculate%20the%20mean%20date%20etc.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBelow%20is%20a%20little%20script%20that%20when%20you%20run%20it%2C%20it%20will%20create%20a%20data%20table%20with%20a%20single%20character%20column%20that%20has%20the%20structure%20of%20dd.mm.yy.%26nbsp%3B%20The%20script%20then%20creates%20a%20numeric%20JMP%20Date%20column%20changing%20the%20display%20structure%20to%20yyyy-mm-dd.%20%26nbsp%3B%20The%20stript%20then%20goes%20on%20and%20creates%20a%20character%20column%2C%20which%20manipulates%20the%20character%20Date%20columns%20value%20into%20a%20new%20character%20string%20of%20the%20structure%20%22yyy-mm-dd%22.%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(%201%20)%3B%0A%0A%2F%2F%20Create%20a%20beginning%20data%20table%0Adt%20%3D%20New%20Table(%20%22Dates%22%2C%0A%20New%20Column(%20%22Date%22%2C%0A%20%20Character%2C%0A%20%20ordinal%2C%0A%20%20Values(%20%7B%2225.04.15%22%2C%20%2222.09.15%22%2C%20%2203.11.15%22%7D%20)%0A%20)%0A)%3B%0A%0A%2F%2F%20Create%20a%20new%20numeric%20column%20that%20contains%20a%20JMP%20date%20value%0A%2F%2F%20and%20tell%20JMP%20to%20format%20the%20numeric%20value%20using%20a%0A%2F%2F%20yyy-mm-dd%20structure%0Adt%20%26lt%3B%26lt%3B%20New%20Column(%20%22Numeric%20Date%22%2C%0A%20formula(%0A%20%20Date%20DMY(%0A%20%20%20Num(%20Left(%20Char(%20%3ADate%20)%2C%202%20)%20)%2C%0A%20%20%20Num(%20Substr(%20Char(%20%3ADate%20)%2C%204%2C%202%20)%20)%2C%0A%20%20%20Num(%20%2220%22%20%7C%7C%20Right(%20Char(%20%3ADate%20)%2C%202%20)%20)%0A%20%20)%0A%20)%2C%0A%20format(%22yyyy-mm-dd%22)%0A)%3B%0A%0A%2F%2F%20Create%20a%20new%20character%20column%20that%20rearanges%20the%20data%20from%0A%2F%2F%20from%20the%20character%20column%20%22Date%22%0Adt%20%26lt%3B%26lt%3B%20New%20Column(%20%22Character%20Date%22%2C%0A%20character%2C%0A%20formula(%0A%20%20%2220%22%20%7C%7C%20Right(%20Char(%20%3ADate%20)%2C%202%20)%20%7C%7C%20%22-%22%20%7C%7C%0A%20%20Substr(%20Char(%20%3ADate%20)%2C%204%2C%202%20)%20%7C%7C%20%22-%22%20%7C%7C%20Left(%20Char(%20%3ADate%20)%2C%202%20)%0A%20)%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-227028%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20change%20date%20format%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-227028%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screen%20Shot%202019-09-24%20at%208.58.54%20PM.png%22%20style%3D%22width%3A%20205px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Screen%20Shot%202019-09-24%20at%208.58.54%20PM.png%22%20style%3D%22width%3A%20205px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Screen%20Shot%202019-09-24%20at%208.58.54%20PM.png%22%20style%3D%22width%3A%20205px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F19459i8A96D85D1D1CDA53%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screen%20Shot%202019-09-24%20at%208.58.54%20PM.png%22%20alt%3D%22Screen%20Shot%202019-09-24%20at%208.58.54%20PM.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screen%20Shot%202019-09-24%20at%208.59.58%20PM.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Screen%20Shot%202019-09-24%20at%208.59.58%20PM.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Screen%20Shot%202019-09-24%20at%208.59.58%20PM.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F19460iC07B2108B2BECB09%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Screen%20Shot%202019-09-24%20at%208.59.58%20PM.png%22%20alt%3D%22Screen%20Shot%202019-09-24%20at%208.59.58%20PM.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-227027%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20change%20date%20format%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-227027%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E1.%20orignal%20date%20column%3A%20charater%2C%20ordinal%3C%2FP%3E%3CP%3E2.%20dd.mm.yyyy%3C%2FP%3E%3CP%3EWithout%20looking%20further%20into%20change%20the%20character%20column%2C%20I%20believe%20the%20formula%20formated%20it%20automatically%20to%20character%2C%20because%20I%20can%20not%20change%20into%20another%20data%20type%20%2F%20modeling%20type%20without%20having%20an%20empty%2C%20new%20column%20again.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-227026%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20change%20date%20format%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-227026%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EI%20am%20positive%20that%20such%20a%20character%20date%20structure%20can%20be%20output.%26nbsp%3B%20I%20have%20a%20couple%20of%20questions.%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EWhat%20is%20the%20original%20column's%20format%3F%3COL%3E%0A%3CLI%3ENumeric%2FCharacter%3C%2FLI%3E%0A%3CLI%3EIf%20Character%2C%20what%20is%20it's%20structure%2C%2020JUL2019%20or%2007%2F20%2F2019%2C%20or%20what%3F%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3C%2FLI%3E%0A%3CLI%3EWhy%20do%20you%20need%20the%20new%20column%20to%20be%20a%20character%20column%3F%3C%2FLI%3E%0A%3C%2FOL%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-227025%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20change%20date%20format%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-227025%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EJim%2C%3CBR%20%2F%3Eone%20more%20minor%20but%20important%20point%2C%20is%20it%20possible%20that%20when%20using%20data%20type%20%22char%22%20that%20I%20can%20not%20get%20a%20numeric%20output%20date%20like%20yyyy-mm-dd%3F%20I%20tried%20to%20establish%20another%20column%20to%20change%20from%20the%20new%20column%20with%20a%20char%20date%20to%20a%20output%20as%20mention%20above%20but%20I%20was%20not%20able%20to%20create%20it.%3CBR%20%2F%3EPlease%20let%20me%20know%20if%20you%20have%20an%20additional%20solution!%3CBR%20%2F%3EThank%20you%2C%3CBR%20%2F%3EMarc%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-227012%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20change%20date%20format%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-227012%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHi%20Jim%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3BIt%20worked!%20Thank%20you!%20The%20only%20thing%20I%20had%20to%20do%20is%20remove%20DMY%20from%20the%20formula!%26nbsp%3B%3C%2FP%3E%3CP%3EAwesome.%3C%2FP%3E%3CP%3EThank%20you%20again%2C%3C%2FP%3E%3CP%3EMarc%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-226445%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20change%20date%20format%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-226445%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHere%20is%20a%20simple%20way%20to%20do%20what%20you%20need%20that%20will%20insure%20that%20the%20proper%20parts%20of%20you%20inputted%20column%20are%20selected%20for%20the%20day%2C%20month%20and%20year.%3C%2FP%3E%0A%3CP%3EInput%20your%20data%3C%2FP%3E%0A%3CP%3ECreate%20a%20new%20numeric%20column%2C%20and%20specify%20in%20the%20Col%20Info%20to%20use%20the%20Date%20format%20that%20you%20want%3C%2FP%3E%0A%3CP%3EUse%20the%20following%20formula%20in%20the%20column%20to%20convert%20the%20data%20from%20your%20original%20column%20into%20a%20JMP%20numeric%20date%20column.%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EDate%20DMY(%0A%20Num(%20Left(%20Char(%20%3Ayourcolname%20)%2C%202%20)%20)%2C%0A%20Num(%20Substr(%20Char(%20%3Ayourcolname%20)%2C%204%2C%202%20)%20)%2C%0A%20Num(%20%2220%22%20%7C%7C%20Right(%20Char(%20%3Ayourcolname%20)%2C%202%20)%20)%0A)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-226431%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20change%20date%20format%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-226431%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHi%20Jim%2C%3C%2FP%3E%3CP%3E%26nbsp%3BI%20never%20though%20I%20could%20open%20an%20xlsx%20file%20directly%20in%20JMP%2C%20I%20tried%20and%20I%20was%20not%20able%20to%20open%20it.%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20%22date%22%20column%20is%20a%20character%20%2F%20ordinal.%20In%20the%20new%20column%20I%20changed%20it%20into%20numeric%20%2F%20ordinal%20and%20formated%20into%20yyyy-mm-dd.%20The%20change%20into%20numeric%20resulted%20in%20the%20numeric%20value%2C%20which%20I%20then%20formated%20into%20yyyy-mm-dd.%20%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20do%20I%20have%20to%20do%20to%20change%20JMP%20thinking%20it%20is%20a%20string%20%3D%20month%20value%3F%3C%2FP%3E%3CP%3EThanks%20for%20your%20support%2C%26nbsp%3B%3C%2FP%3E%3CP%3EMarc%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-226392%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20change%20date%20format%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-226392%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EI%20have%20some%20questions%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3E%26nbsp%3BHow%20do%20you%20get%20your%20xlsx%20data%20into%20JMP%3F%26nbsp%3B%20You%20say%20%22After%20copying%22.%26nbsp%3B%20Is%20this%20a%20copy%20and%20paste%20into%20new%20JMP%20data%20table%3F%26nbsp%3B%20Have%20you%20tried%20just%20a%20%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%20File%3D%3D%26gt%3BOpen%20%26nbsp%3B%20%26nbsp%3B%20and%20then%20pointing%20to%20the%20xlsx%20file%20and%20opening%20it%20that%20way%3F%3C%2FLI%3E%0A%3CLI%3EOnce%20you%20have%20%22Copied%22%20the%20data%20into%20JMP%2C%20what%20is%20the%20Data%20Type%20of%20the%20column%20that%20has%20the%20%2203.10.14%22%20data%20in%20it%3F%3C%2FLI%3E%0A%3CLI%3EAssuming%20the%20%2203.10.14%22%20data%20has%20a%20Data%20Type%20of%20Character%2C%20what%20are%20the%20steps%20you%20are%20using%20in%20the%20new%20column%20to%20convert%20it%20to%20a%20Numeric%20data%20type%3F%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3EI%20suspect%20your%20issue%20with%20the%20%2220.10.15%22%20values%2C%20is%20that%20somehow%20JMP%20thinks%20the%20first%20values%20in%20the%20string%20is%20the%20month%20value%2C%20and%20not%20the%20day%20value.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
Marc3
Level II

change date format

Hi, 

 I received an .xlsx data sheet with the following date "dd.mm.yy" in a column, i.e. "03.10.14".

After copying the data into JMP I created a new column to get the numeric number for the date and converted the date into 1. a numeric date type with

2. a ordinal modeling type and

3. format to "yyyy-mm-dd". 

 

However, some dates "20.10.15" do not appear in my new column. Is there a defnition conflict?

 

Please advise how I can overcome this issue. 

 

 

 

 

 

 

12 REPLIES 12
Marc3
Level II

Re: change date format

Thank you for your extended reply.

I worked on the data sheet and converted the "character date" into a numeric date, column "numdate". Afterwards I covert the numberic date into the format I wanted it to be, column "newdate". However, for some reason the new date does not show for some dates stated in the "date" column. Why does it not take certain dates, i.e. 12.11.14 and converts the numdate value into the new format?

I attached a jmp table with the data for you to actually see the data. I hope this could help solving the issue. 

Thanks in advance, Marc

 

Date DMY(
			Num( Left( Char( :Date ), 2 ) ),
			Num( Substr( Char( :Date ), 4, 2 ) ),
			Num( "20" || Right( Char( :Date ), 2 ) )
		)

 

txnelson
Super User

Re: change date format

Your issue is that you are reading the initial date field wrong.  The initial date field is in the format "dd.mm.yy" and you are reading it as if it is "mm.dd.yy".  I have attached your data table where it can be seen that the numdate value does not match your newdate value.  In the data table, I have created a Character Date column, which uses a format() function in the formula to come up with the character value.

 

 

Jim
Marc3
Level II

Re: change date format

I see the step that was needed to complete the conversion.
Problem solved. Thank you!

Recommended Articles