Converting time stamp in waveform to seconds

Hello,
I would like to convert the time stamp in a waveform (coming from 'AI Sample Channel') into seconds.  Currently when I read the waveform into a file I get a format that looks like
18:00:47.453000
Any help you can offer would be greatly appreciated, it seems like this should be easy to do?
Thanks,
Cullen

In the attached example, I compare converting the datestamp to seconds by converting to double, to extended precision and doing a delta directly on the timestamp iteself (then converting). 
Running the VI showed the same results (using Win-XP) for all three cases.  Unless you have a better OS, then the top example would probably do.
At least the example will show you how to convert to seconds (in 50ms steps for the example), and how to do it using the array directly (polymorphic functions).
Hope it helps,
RayR
Attachments:
DeltaTime.vi ‏13 KB

Similar Messages

  • How to convert time stamp to time in update rule

    Anybody know how to convert time stamp to time only?  Any FM that I can use?
    time stamp example
    20010203100201
    Result:
    10:02:01
    Thank
    Sudree

    Please search the forum

  • Error when converting time stamp in date time time zone CST  in IC

    Hi Experts,
    We have recently upgraded from CRM 5.0 to CRM 2007. We are using IC WEB Employee interaction center.
    so when agent create service ticket in interaction center and close the ticket on same day we are getting an error saying Error when converting time stamp in date time time zone CST.
    we thought there may be problem while installing SAP CRM by basis team in time zone, but we did not find any problem.
    So please advice how to resolve this issue.
    Regards,
    Teja

    Hi Teja,
    I saw a similar message, and it was resolved by adding a timezone to the user profile defaults tab in SU3. I believe the system has been configured to convert between users' timezone and the system timezone, therefore it needs to know each users' timezone.
    Regards,
    Simon.

  • Time stamp on Waveform Charts

    I'm making an application where I sample data every 5 seconds. I use the Time Delay VI to obtain the sampling interval, and then set the chart options using chart properties/format and precision/relative time. The chart is adding a point every 5 secs as it should, scale looks ok. However, the time scale on the graph is incrementing only one second at the time (although actual time elapsed is 5 secs). The log file gives the time stamps just as it should. Is there a way to make the waveform chart give the real time (other than the obvious solution of sampling 1 pt/sec)?

    I'm just directly passing scalar values to the chart. The total acquisition time is about an hour, and the idea is to display data as they vary with time.

  • Converting time stamp to double

    Hello,
    I am currently using the write to spreadsheet file.vi to save data.
    It looks something like this:
    I also want to add the date and time stamp into the saved data but do not know a way of converting a date and time stamp to 'double format'. When the date and time stamp is in teh double format I can easily concatenate the data stream with the 'date and time' in a 2-D array.
    Thanks,
    Nevica

    Duplicate post
    http://forums.ni.com/t5/LabVIEW/converting-time-st​amp-to-double/td-p/1181397
    Tim
    Johnson Controls
    Holland Michigan

  • How to Convert Time Stamp to String for Filename use

    I'm writing an Labview application in which I would like to convert pull time stamp infor from Time Stamp VI and convert to string so I can use to append as part of filename.
    The fomat that I want may look something like basefilename081208_1300.  This would represent a file name that has elements consisting of the date 08/12/08 and 13:00 hours zulu.
    Paul 

    Hello:
    Use the Format Date/Time String VI, and use as the format string the following: %d%m%y_%H%M
     This way you'll get the date string you want. 
    Then concatenate the output to other strings you need to name your file.
    I've attached an screenshot.
    Hope this helps.
    Robst.
    Robst - CLD
    Using LabVIEW since version 7.0
    Attachments:
    datetime string.JPG ‏20 KB

  • Convert Time Stamp to String

    What is the most efficienct way to convert a Time Stamp Control to a MM/DD/YYYY string? I am going to use its output as date parameters to a WHERE clause to a SQL Server query.
    Solved!
    Go to Solution.

    Eric1977 wrote:
    Jeff,
    I just did it like this. Do you forsee any problems?
    Well, what is the output? Do you foresee a problem? The LabVIEW Help is quite clear on the format. The very first sentence of the Help file for the Format Date Time String provide a link to the codes: http://zone.ni.com/reference/en-XX/help/371361H-01​/glang/codes_for_time_format_str/

  • To convert time stamp (data element ARFCTIME (char 8)) into date and time

    Hi All,
    ARFCSDATA table stores time stamp value like 41C9EC9D or 41D2DA75 (in char8 format)...how to convert it to date & time?
    Thanks in advance.
    Vithalprasad

    Hi All,
    Thanks a lot for your response.
    All these FMs are using timestamp which is having length of 14 or 16. .But in this case the field ARFCSDATA-ARFCTIME is having values in char 8 field and these values are in hexa decimal format.
    Please pass the information in this regard if you have.
    Thanks a lot.
    Vithalprasad

  • Help to read a table with data source and convert time stamp

    Hi Gurus,
      I have a req and need to write a ABAP prog. As soon as i excute ABAP program it should ask me enter a data source name, then my ABAP prog has excute teh code, in ABAP code i have to read a table with this data source as key, sort time stamp from table and should display the data source and time stamp as output.
    As follows:
    Enter Data Source Name: 
    Then user enters : 2lis_11_vahdr
    Then out put should be "Data source  :"  10-15-2008.
    The time stamp format in table is 20,050,126,031,520 (YYYYMMDDhhmmss). I have to display as 05-26-2005. Any help would be apprciated.
    Thanks,
    Ram

    Hi Jayanthi Babu Peruri,
    I tried to extract YEAR, MONTH, DAY separately and using
    EDIT MASK written it.
    Definitely there will be some STANDARD CONVERSION ROUTINE will be there. But no idea about it.
    DATA : V_TS      TYPE TIMESTAMP,
           V_TS_T    TYPE CHAR16,
           V_YYYY    TYPE CHAR04,
           V_MM      TYPE CHAR02,
           V_DD      TYPE CHAR02.
    START-OF-SELECTION.
      GET TIME STAMP FIELD V_TS.
      V_TS_T = V_TS.
      CONDENSE V_TS_T.
      V_YYYY = V_TS_T.
      V_MM   = V_TS_T+4(2).
      V_DD   = V_TS_T+6(2).
      V_TS_T(2) = V_MM.
      V_TS_T+2(2) = V_DD.
      V_TS_T+4(4) = V_YYYY.
      SKIP 10.
      WRITE : /10 V_TS," USING EDIT MASK '____-__-________'.
              /10 V_YYYY,
              /10 V_MM,
              /10 V_DD,
              /10 V_TS_T USING EDIT MASK '__-__-__________'.
    If you want DATE alone, just declare the length of V_TS_T as 10.
    Regards,
    R.Nagarajan.
    We can -

  • Converting time stamp in SECONDS to a calendar date format.. problems

    Hello. I'm trying to convert a long interger that represents the number of SECONDS passed since the 1970 date
    the number was originally generated by php's mktime() function
    one of the numbers I have for example is this : 1126933200
    I haven't done the math but this is a date probably around september of 2005.. it's irrelevant anyhow.
    I want to convert this to a date format I can use in java. I've tried to create a new date like so :
    Date date = new Date(1126933200);
    I've also tried it with the calendar method like so :
    Calendar calendar = new GregorianCalendar();
    calendar.setTimeInMillis(1126933200);
    it was only then that I realized that both these methods require the number of MILLI seconds. So I tried doing a simple multiplication by 1000 on my original number and then I started getting a "integer number too large" error when trying to compile.
    so i'm kind of at a loss here.. i figure I could make a function myself that would divide my number in days of 86400 seconds.. and then i'd have to keep in mind the bisectal (sp) and the months with more and less days etc.. but i'm sure there must be an easier way.
    and i don't get why a method who's meant to receive a very long number is giving me an error when i try to give one to it.
    your help is appreciated as always. thanks

    Hello. I'm trying to convert a long interger that
    represents the number of SECONDS passed since the
    1970 date
    the number was originally generated by php's mktime()
    function
    one of the numbers I have for example is this :
    1126933200
    I haven't done the math but this is a date probably
    around september of 2005.. it's irrelevant anyhow.
    I want to convert this to a date format I can use in
    java. I've tried to create a new date like so :
    Date date = new Date(1126933200);
    I've also tried it with the calendar method like so
    Calendar calendar = new GregorianCalendar();
    calendar.setTimeInMillis(1126933200);
    it was only then that I realized that both these
    methods require the number of MILLI seconds. So I
    tried doing a simple multiplication by 1000 on my
    original number and then I started getting a "integer
    number too large" error when trying to compile.So you needed to add L to one of the numbers.
    Note you also need to define what timezone that seconds number represents.
    With Gregorian it is going to use the local timezone (the code here will anyways). The code using Date is using the UTC timezone.

  • How to convert Time stamp format in CR

    Dear all Expert,
    I have a question. I have a field in my CR which is date time. It show 24.03.2011 03:30:00 in the tables. But when i drop this field in my CR, it become 20,100,906,080,000.00. How to convert it to 24.03.2011 03:30:00 in CR?
    Thank You.

    Hi Alex,
    If cdatetime won't work, try the following by creating a formula . Note : replace your time with database date field i.e. date_4.
    WhilePrintingRecords;
    Stringvar date4:=totext('24.03.2011 03:30:00');
    Numbervar yr;
    Numbervar mon;
    Numbervar dt;
    numbervar hh;
    numbervar mm;
    numbervar ss;
    yr:=tonumber(mid(date4,7,4));
    mon:=tonumber(mid(date4,4,2));
    dt:=tonumber(left(date4,2));
    hh:=tonumber(mid(date4,12,2));
    mm:=tonumber(mid(date4,15,2));
    ss:=tonumber(mid(date4,18,2));
    cdatetime(yr,mon,dt,hh,mm,ss);
    Thanks,
    Sastry

  • Time stamps to string with seconds

    Good Day
    Im writing a program for my DAQ system. Its required that my
    data is saved with hours, mins and secs. The get date/time
    string VI seems to only output a string with the date and with
    hours and minutes. 
    How would I include the seconds into the outputed string.
    Thank You for your time.

    The vi has an boolean input 'want seconds' default is FALSE. Wire a TRUE and your done
    For a more flexible output there is also the
    Format Date/Time String Function
    Owning Palette: String Functions
    Requires: Base Package
    Displays a timestamp value or a numeric value as time in the format you specify using time format codes. For example, %c displays locale-specific date/time. Time-related format codes include the following: %X (locale-specific time), %H (hour, 24-hour clock), %I (hour, 12-hour clock), %M (minute), %S (second), %<digit>u (fractional seconds with <digit> precision), and %p (a.m./p.m. flag). Date-related format codes include the following: %x (locale-specific date), %y (year within century), %Y (year including century), %m (month number), %b (abbreviated month name), %d (day of month), and %a (abbreviated weekday name).
    Details  
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

  • I used "Get Waveform Components" to separate waveform data. I need to get the time stamp and write it on file as an header.

    I am not able to solve the problem because I can't find an I/O vi that writes on file time stamp data. An error occurs, because of connecting different data types. How can I convert time stamp data so that I can use it as input in a write on file vi? Please, help me!

    The problem with the selection seems to be that you are using two different indexing tunnels on the for loop. One of them loops over every value of the first incoming waveform, the other one over all waveforms in the incoming array. The value you wire to the N terminal will be ignored, the number of loop executions will be the minimum of your indexes. Anyway, the loop doesn't seem to do what you wanted:
    - If you want to store the complete waveform: loop over all waveforms, check for the maximum of each of them and write it just like you do now.
    - If you want to store only the values of each waveform that actually exceeded the threshold: You can either use 2 nested for loops to iterate over each value of each waveform. Use shift registers t
    o create new arrays of timestamps / values for the values you want to store. You need to either convert the waveform to x-y-pairs (VI on analog waveform palette) or calculate your own timestamps. You might as well want to check out the "Search waveform" VI. Configure it so that value+-tolerance covers the band between your expected minimum value and your threshold value. The VI will give you the indices and timestamps of all fits.

  • Problem with Time stamp function module for converting US to Japan

    Hi All,
    I need standard function module for converting US Timestamp to Japan, Can any one let me know is there any standard function modules.
    thanks in advance!
    Regards,
    Kalidas.T
    Edited by: Kalidas Thirumoorthy on May 5, 2009 5:29 PM
    Edited by: Kalidas Thirumoorthy on May 5, 2009 5:30 PM
    Edited by: Kalidas Thirumoorthy on May 5, 2009 5:30 PM

    Try this way:
    CONVERT TIME STAMP <tst> TIME ZONE <tz> INTO DATE <d> TIME <t>.
    CONVERT DATE <d> TIME <t> INTO TIME STAMP <tst> TIME ZONE <tz>.
    <tst> is of type P(8) or P(11) with 7 decimal places
    <tz> of type C(6)
    Refer to help.sap.com for more details.

  • Converting UTC time stamp to local time (CET)

    Is there a smooth way to convert a time stamp from UTC time into the local time (e.g. CET)?
    CONVERT TIME STAMP.... Just converts the timestamp from local time zone to UTC, is there another comand to perform the opposite conversion?
    TIA!
    /Armin

    Hi Armin
    The statement does not only convert from local time zone to UTC you can specifiy any timezone:
    CONVERT TIME STAMP time_stamp TIME ZONE tz
            INTO [DATE dat] [TIME tim]
            [DAYLIGHT SAVING TIME dst].
    The following statement can also be used to convert from date time to timestamp.
    CONVERT DATE dat [TIME tim [DAYLIGHT SAVING TIME dst]]
            INTO TIME STAMP time_stamp TIME ZONE tz.
    Regards
    Faaiez

Maybe you are looking for