早上好,
我无法在 JMP 中获得与 Excel 中一样的正确格式(d/m/y),经过几次尝试后,我在 JMP 中仍然得到:m/d/y。
感谢您的帮助
真挚地
也许您可以使用以下脚本:
Names default to here(1);
clear log();
clear symbols();
clear globals();
path = use your correct path...
// Importer un fichier Excel : essai date.xlsx
// → Data Table( "Feuil1" )
Open(
path,
Worksheets( "Feuil1" ),
Use for all sheets( 1 ),
Concatenate Worksheets( 0 ),
Create Concatenation Column( 0 ),
Worksheet Settings(
1,
Has Column Headers( 1 ),
Number of Rows in Headers( 4 ),
Headers Start on Row( 1 ),
Data Starts on Row( 5 ),
Data Starts on Column( 1 ),
Data Ends on Row( 0 ),
Data Ends on Column( 0 ),
Replicated Spanned Rows( 1 ),
Replicated Spanned Headers( 0 ),
Suppress Hidden Rows( 1 ),
Suppress Hidden Columns( 1 ),
Suppress Empty Columns( 0 ),
Treat as Hierarchy( 0 ),
Multiple Series Stack( 0 ),
Import Cell Colors( 0 ),
Limit Column Detect( 0 ),
Column Separator String( "-" ),
Column Numeric Format(
Index( 0 ),
Column Name( "Datectrl + ;"n ),
Datatype( "Character" )
),
Column Numeric Format( Index( 7 ), Format( "Best", 9 ) ),
Column Numeric Format(
Index( 11 ),
Format( "Best", Use thousands separator( 1 ), 9 )
),
Column Numeric Format(
Index( 12 ),
Format( "Best", Use thousands separator( 1 ), 9 )
),
Column Numeric Format( Index( 13 ), Datatype( "Character" ) ),
Column Numeric Format( Index( 14 ), Format( "d/m/y", 10 ) ),
Column Numeric Format( Index( 15 ), Datatype( "Character" ) )
)
);
// Modifier les informations de colonne : Datectrl + ;
Data Table( "Feuil1" ):"Datectrl + ;"n <<
Set Data Type(
Numeric,
Format( "Format Pattern", "
<DL><DD>
/
<MM>
/
<YYYY>
", 10 ), Input Format( "Format Pattern", "
</YYYY>
</MM>
</DD>
<DD>
<CODE class=" language-jsl">/
<MM>
/
<YYYY>
" ) ) << Set Modeling Type( "Continuous" ) << Set Field Width( 12 );
</YYYY>
</MM>奇怪,JMP是哪个版本?
我尝试使用 JMP18 和 JMP19,无需调整设置,我得到了:

也许是(系统)偏好设置有误?
禁用“限制列类型检测”,这样在这种情况下您可以将数据作为字符发送到 JMP 表中(从中您可以更轻松地根据需要设置格式)。

然后,您可以删除多余的行(可以在导入时完成,但请确保仍然有字符数据)。从这里开始,您可以修复格式

通常,格式模式是将字符数据格式化为日期的最佳方式。

将数据正确格式化为 JMP 编号后,您可以根据需要更改格式