Separating Systime() Into CSV

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Separating Systime() Into CSV

    I have my information writing to a csv but I really don't like how the systime function writes it to one column. Is there a way of separating the date, and time into separate columns? I've tried using the systemdate and systemtime functions but the systemdate only returns the month and the systemtime only returns the hour. I can't seem to figure out how to use those to functions. I'm using 2016.0. I've attached the code and if you look at it you will see a variable named Test. This is in there just to see if I can grab the time but like I said earlier, it is only grabbing the hour and nothing else. Any help would be greatly appreciated. Thanks in advance.
    code.JPG


  • #2
    yes, systemtime() and systemdate(), check the help files for more details.

    the mm and ss need to be lowercase.

    Comment


    • Tinyfxds
      Tinyfxds commented
      Editing a comment
      Great! That worked perfectly, thank you. I have a love hate relationship with the help files. Sometimes its easy to find what I'm looking for and sometimes it doesn't want to cooperate with me.

  • #3
    Somethng like this ?
    Code:
    ASSIGN/V2=SYSTEMTIME("HH:mm:ss")
    ASSIGN/HOUR1=ELEMENT(1,":",V2)
    ASSIGN/MINUTE1=ELEMENT(2,":",V2)
    ASSIGN/SEC1=ELEMENT(3,":",V2)
    You can search systemtime, systemdate or systime on the forum, you wil find different ways.

    Comment


    • #4
      I'd like to be able to make my columns in the CSV file wider so that you can read all of the information. It seems that if I edit the column width it doesn't save that when I close the file. I'm assuming that has something to do with the format of the CSV file itself? Is there a way to increase the column widths in a CSV?

      Comment


      • #5
        No. A CSV file only contains data, no formatting. But if you're not going to add data from PC-DMIS to the same file later, you can save it in the Excel file format, which (of course) will keep the layout, too.

        Edit: There's also the Excel shortcut - click in the upper left corner to select the whole sheet, double click in the (Excel) header on the separator line between column A and B -> all columns expand to the widest data in each column.
        Last edited by AndersI; 05-15-2019, 07:47 AM.
        AndersI
        SW support - Hexagon Metrology Nordic AB

        Comment


        • Tinyfxds
          Tinyfxds commented
          Editing a comment
          This would be a file that keeps getting data added to it but the excel shortcut would work well when view the information.

      Related Topics

      Collapse

      Working...
      X