Jump to content

sherzaad

Members
  • Content count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About sherzaad

  • Rank
    Newbie
  1. sherzaad

    saving file with a timestamp

    OK understood. Thank you for your reply but assuming that the program support this, how would i modify the xml script to include a timestamp?
  2. sherzaad

    saving file with a timestamp

    Hi, I'm absolutely new and novice to the concept of XML/xls but I have the following task that I would like to do. I am using PicoScope which allows you to save macros as xml. So far I am able to save the file on trigger to a specific location with a pre-defined name with this code: <?xml version="1.0" encoding="utf-8" standalone="yes"?><document> <userealtime>False</userealtime> <event category="Interaction" time="05/06/17 15:39:59.162"> Run.Pressed=False</event> <event category="Interaction" time="05/06/17 15:40:00.060"> File.SaveAs.IO=C:\My Documents\Waveforms\temp_name.psdata</event> </document> What I would like now to do is along with the pre-defined name to add a timestamp to the filename. I have found this online that would give me the current date/time but I have no idea how to integrate it into the above script: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="date"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/> <xsl:template match="/"> <Contacts Date="{substring(date:date-time(),1,10)}"> <cd><xsl:value-of select="date:date-time()"/></cd> </Contacts> </xsl:template> </xsl:stylesheet> Any insight on how to do this would be much appreciated. Sherzaad
×