cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP Security Notice: CVE-2026-109618 and CVE-2026-109619

    JMP promptly initiated a review of its products, services, and relevant infrastructure for exposure to CVE-2026-109618 and CVE-2026-109619.

    Our assessment of JMP products has not identified exposure to these vulnerabilities. Where remediation was required within supporting environments, appropriate security updates and controls have been applied and validated.

    We have identified no evidence of successful exploitation or unauthorized access to JMP systems or customer information associated with these vulnerabilities.

    JMP continues to monitor the issue and relevant vendor guidance. No action is required by JMP customers at this time.

  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
Celine1
Level II

Format Date Time yyyymmdd_hhmmss

Greetings,

 

I am having an issue with a date-time format when save a csv file.
The filename should be like "Summary_20231103_082637".

formattedDate = Format(Today(), "yyyymmdd_hhmmss");
filename = Convert File Path("C:\Path\Summary_" || formattedDate || ".xlsx", absolute );
if(File Exists (filename),
dt << Save (filename, Mode("Append")),
dt << Save (filename));



I tried to format the datetime with

formatDate = Format(Today(), "yyyymmdd");
Show(formatDate);

Result: "20231103"

format1 = Format(Today(), "h:m:s");
Show(format1);

Result: "6:18:32 PM"

format2 = Format(Today(), "<YYYY><MM><DD><-><hh24><mm><ss>");
Show(format2);

Result: "11/03/2023"

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Format Date Time yyyymmdd_hhmmss

You don't indicate which JMP version you have, but if possible I would use Format Pattern (I think it was added in JMP16)

Names Default To Here(1);
formatted_date = Format(Today(), "Format Pattern", "<YYYY><MM><DD>_<hh24><mm><ss>");

Other option which will work always, is to build it from start as a string using functions such as Year(), Month(), Day(), and so on

-Jarmo

View solution in original post

1 REPLY 1
jthi
Super User

Re: Format Date Time yyyymmdd_hhmmss

You don't indicate which JMP version you have, but if possible I would use Format Pattern (I think it was added in JMP16)

Names Default To Here(1);
formatted_date = Format(Today(), "Format Pattern", "<YYYY><MM><DD>_<hh24><mm><ss>");

Other option which will work always, is to build it from start as a string using functions such as Year(), Month(), Day(), and so on

-Jarmo

Recommended Articles