time stamp to number conversion

  • Permalink
  • submit to reddit
  • Email
  • Follow


Hi All,

I notice in Labview 7.0 the 'Get Date/Time to Seconds' and 'Seconds to
Date/Time' now output a Time Stamp rather than actual seconds.
There is a 'To Time Stamp" standard vi in the conversion pallet that
converts a number (seconds) to a time stamp but I really need to
convert from a Time Stamp to real seconds.
Does anyone have a vi that might do this or is there something already
in LabVIEW 7.0 I have overlooked?

Many Thanks in Advance for your help.

Sammy Mason
0
Reply x9561 (148612) 5/19/2004 4:29:45 PM

See related articles to this posting


Use the Get Date/Time in Seconds widget.
Connect it to a "To Double Precision Float" conversion to get the time
(since 1904) in seconds.

Les Hammer
0
Reply x9561 (148612) 5/19/2004 5:08:24 PM

Thank you very much for the help! :)

Sammy
0
Reply x9561 (148612) 5/20/2004 8:15:43 AM
comp.lang.labview 35383 articles. 13 followers. Post

2 Replies
803 Views

Similar Articles

[PageSpeed] 10/23/2014 7:54:21 AM


  • Permalink
  • submit to reddit
  • Email
  • Follow


Reply:

Similar Artilces:

Re: time stamp to number conversion
If I  need days I take the result and divide by 86400, the number of seconds in a day.  If you are working with UTC time stamps and you want to convert it dividing by the units it the only way i have seen.   What do you mean when you say you need seconds from the time stamp?  I have some time VI I have made that may be of some help if I understood what you were looking for.   Best Regards Tim C. ...

Number to Time Conversion
is it possible in sql to convert a 6 digit integer in to a time field with out converting to character and then substringing e.g 161201 to 16:12:01 SELECT TIME('00:00:00') + CAST(int6 AS DEC(6,0)) "Time" FROM (VALUES 161201) Q(int6); ------------------------------------------------------------------------------ Time -------- 16:12:01 1 record(s) selected. OR SELECT TIME('00:00:00') + (int6/10000) Hours + MOD(int6/100, 100) Minutes + MOD(int6, 100) Seconds AS "TIME" FROM (VALUES 161201) Q(int6); --------------...

how to get time stamp as a number
The get date/time vi gives time stamp in string or cluster. I want time stamp as number because i have to give time stamp number to a build array along with another number. How do i get this , say for example time as 14.32 > The get date/time vi gives time stamp in string or cluster. I want > time stamp as number because i have to give time stamp number to a > build array along with another number. How do i get this , say for > example time as 14.32 One of the many possibility is divide string "14.23" on String>Search and Replace function : -> 'string' con...

tcp conversation with time stamps?
I am trying to analyse the performance of a web based user interface (JSP, if you care...) I have succesfully captured a session's packets to a file, using tcpdump. Viewing the packets in ethereal is impresive, but confusing(since I'm not a network guru). Ethereal's "analyze->Follow TCP Stream" gives me an almost perfect dump, which corresponds to my (application level) understanding of the communication between client/server. Lovely. But sadly, from my performance analysis requirment the one thing missing from "follow TCP stream" is timestamps. So; can...

Conversion of ISO Date-stamps into Weekday Numbers
HOW TO COMPUTE THE DAY OF THE WEEK FOR DATE-STAMPS FROM A.D. 1 TO 4246 - using Hans Lachman's Method of Congruence as optimised below - Strictly adhering to Lachman's Maxim (Complexity is a diseconomy of scale), this method was designed to run SUPERbly as a stand-alone procedure, when the MOST basic of computer is the only resource--meaning no values needed from user tables or system calls, no floating point nor integer variables, and minimal operating system functionality beyond superBASIC as a command- line interpreter. It is valid for (historical) Julian dates as o...

Regarding Time conversion, secondly number comparison
Hi, I am working on awk programming which is similar to C programming and have got a doubt about time function returning a float value. Ex: 01:01:30 should return 61.5 when i have tried my way i am not able to get the seconds value (30/60=0.5) So can anyone give me ideas, throught which i can do similar coding in AWK programming. Secondly i am comparing two number. Ex: 91402777777 is the dialled number and the area code is 91 (Which has got calculation needed to be done upon comparing. When i was doing the string comparison it was matching number 9 and putting the local rate calculations, but...

Re: Conversion of ISO Date-stamps into Weekday Numbers
HOW TO COMPUTE THE DAY OF THE WEEK FOR DATE-STAMPS 10010101 TO 99991231 - using Hans Lachman's Method of Congruence as generalised below - Strictly adhering to Lachman's Maxim (Complexity is a diseconomy of scale), this method is designed to run superbly as a stand-alone subroutine, when the most basic of computer is the only resource--meaning no values needed from user tables or system calls, and no floating point variables. Although using a processor more sophisticated than found on four-function calculators, this method is simpler to execute than Hans' original Me...

Finding a number in a text file and showing the corresponding time stamp.
Hi there, I have been given a text file with numbers in this format "1st value,2nd value, name, time" and there are 1000s of such numbers. Now I have been given 2 numbers which are the 1st and 2nd value, i need to find the corresponding name and time. Can anyone please help me on how I could achieve this please. Thank you very much. you can create a index based on the combination of your first two values such as "1stvalue_2ndvalue", and the "name" and "time" are the values of that index. When you have a give pair of 1st value and 2nd value...

Conversion of time-stamp into string produce 1 h offset
Hello,since I upgraded from 8.1 to 8.5.1 the "format into string" function gives a 1 h offset compared to the time-stamp input (see picture in the doc). The attached SubVI's are running on a Fieldpoint system. The fieldpoints are set to a local time with automatical DST changing disabled. The timeserver is also running without DST changing.  I found this penomenon only with the fieldpoints. On the normal PC the subVI works fine.Maybe I should think about another conversion possibility, but this problem wasn't there before upgrading (never touch a running system???......

DateAdd(interval,number,date) Visual Basic to LabVIEW Time Stamp add 18 months
Hi all,   I need to match Visual Basic Cmd  =  DateAdd("m", 18, Date()) which adds 18 months to today's date.  When I use LabVIEW Time Stamp VI's at first I tried adding 1.5 years in seconds. but this did not match the VB generated method?  What method do  I use in LV to obtain the VB DateAdd("m", 18, Date()) Example 'Add one month to January 31, 2000 document.write(DateAdd("m",1,"31-Jan-00")) Output: 2/29/2000 Perhaps you could do this, at least for a relatively simple case of adding ...

unable to record the time stamp as time stamp.
Hi, I have established a connection between the matlab and the ODBC server of mine. This is the data type which i am trying to fetch Columns 1 through 8 [88] [65] 'NIFTY' 'FUTIDX' [20000831] 'FF' [0] [0] Columns 9 through 12 '14:43:37' [1338] [200] [20000804] As every one knows that the data is stored in a cell array format, the time stamp that is the column 9, is getting stored as a character array. This is causing me problem i want to operate on the time stamps i.e. i want to check the data after every 5th min...

Subtracting a time stamp from another time stamp...
hi... take a look at the attached VI.should give me only 0,006 sec or 0,007 secbut gives me 1hr 0min 0,006 sec...how? T1-T2_LV8.2.1.vi: http://forums.ni.com/attachments/ni/170/346974/1/T1-T2_LV8.2.1.vi If u observe the output of subtraction function, it will show '0.0069999' or 6-7 milliseconds as the difference ( which is what you expect) But then, you are converting that into timestamp which is the time-zone-independent number of seconds that have elapsed since 12:00 a.m., Friday, January 1, 1904, Universal Time. Hence the incorrect result   Hi Dev... thanks a l...

LVM file time stamps
My LVM files do not have evenly separated time stamps.  Is this by design?  I want to record data from multiple channels at say 100S/s and see this in my LVM file.  Ideally each of the 100 data points would be separated by 0.01s.  This is not what I get.   I have tried changing the samples per second and the samples per channel inputs on my timing and read VIs but I don't get even spacing.  I have figured out that the DAQmx Read VI always cuts the number of samples in the file in half.  So sampling at 100S/s g...

How to convert unix time stamp to SAS time stamp
Hi there, I'm new to this group and very much a newbie to SAS. I'm having trouble trying to display unix time stamp to SAS time stamp. can anyone help? Basically, I have a data source that inputs a 20. numeric unix time stamp and in my target SAS table i want it to be datetime. format but obviously since SAS epoc time is 1/1/1960 and unix epoc time to 1/1/1970, the datetime outformat came out as ****** (unreable). Thanks! Lil. ...

Re: How to convert unix time stamp to SAS time stamp
You could subtract 315,597,600 from your Unix timestamp value to obtain a SAS datetime value. I suspect there's something else wrong. The values for a Unix timestamp (number of seconds since 01jan1970) and a SAS datetime value (number of seconds since 01jan1960) are of roughly the same magnitude, so the displayed value will be off by 10 years, but nevertheless a datetime should be displayed. If you're seeing ******, your values may be out of range for some reason (for example, a misplaced decimal point). I'm not sure how you would get 6 asterisks - the minimum width for the dat...

Counting the number of times a report is previewed and the number of times printed.
Hi all, I have a customer that requires a very secure application. I can do everything they want except count report prints and previews. Their application has to count the number of times :- - Each report is previewed to the screen, - The number of times the report is actually sent to a printer. The count is to be recorded in a log with date,time, user, report name etc. I am thinking of making two copies of each report. One that can only preview and the other that can only print to the printer. Then counting once when either one is run. This means a parameter for every report procedure to...

Re: How to convert unix time stamp to SAS time stamp #9
Lillian, you may have missed Dan's update, here it is again. The second argument is the UTC correction. < quote from Dan Nordlund> I probably should have pointed out that the Unix timestamp is relative to 01jan1970 00:00:00 UTC. Lilian appears to be in a UTC+11 timezone, and so the conversion should be Sas_datetime = dhms('01jan1970'd,11,0, timestamp/1000); Hope this is more helpful, < / quote > -Joe On Mon, Jan 5, 2009 at 7:16 PM, Lilian <lilian.chee@gmail.com> wrote: > Just a thought, I'm guessing since I'm in AUS, we're GMT +10 and +1 ...

Re: How to convert unix time stamp to SAS time stamp #3
Can you show some of the values with NO datetime formatting so we can see the actual values. That may help determine what is actually broken. On 1/5/09, Lilian <lilian.chee@gmail.com> wrote: > Thanks for the quick responses. I've tried Jack's suggestion and > subtracted 315,597,600 from the unix time stamp and had the format set > to DateTime. The resulting data still came up in asterisks. Sorry for > my bad example before, it was roughly 16 * and not just 7. Here is a > snipped of the code (generated from DI studio in the Table Loader > step): > > %macr...

Re: How to convert unix time stamp to SAS time stamp #7
Not possible. An odd number of seconds after midnight will always yield and odd value for seconds in the time. In SAS 06jan2009:11:05:12 is 1546859112 01jun2009:11:05:12 is 1559473512 Both numbers are three orders of magnitude smaller than your value. Is sql giving you milliseconds instead of seconds? -----Original Message----- From: Lilian Sent: Monday, January 05, 2009 4:18 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: How to convert unix time stamp to SAS time stamp 1231200312179 translates to 1/6/2009 11:05:12 ...

Re: How to convert unix time stamp to SAS time stamp #4
What date & time do you think is represented by 1229979606474? According to <http://www.4webhelp.net/us/timestamp.php>, the timestamp value a few moments before I wrote this was 1231198162, which is many times smaller than the number you presented. Perhaps, as I suggested earlier, your decimal points are off. If I drop the last three digits from your number and run it through the calculator, I get "1229979606 translates to Monday, December 22nd 2008, 21:00:06 (GMT)". Is that the datetime you expect (adjusting for time zones as necessary)? How are you displaying the val...

Re: How to convert unix time stamp to SAS time stamp #8
> -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On > Behalf Of Nordlund, Dan (DSHS/RDA) > Sent: Monday, January 05, 2009 4:45 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Re: How to convert unix time stamp to SAS time stamp > > > -----Original Message----- > > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On > > Behalf Of Lilian > > Sent: Monday, January 05, 2009 4:18 PM > > To: SAS-L@LISTSERV.UGA.EDU > > Subject: Re: How to convert unix time stamp to SAS time stamp > > > > 12312...

Re: How to convert unix time stamp to SAS time stamp #10
%macro convert_timestamp(ts_var,utc,out_var); &out_var. = dhms('01jan1970'd,&utc.,0, &ts_var./1000); %mend convert_timestamp; Something like that? If you know the out-variable or the in-variable then you can skip those parts. I leave "UTC" as the option (more flexible) but if it is easier you could use dst flag (1 or 0) and then use %if or %eval to generate your 10 or 11. -Joe On Mon, Jan 5, 2009 at 10:16 PM, Lilian <lilian.chee@gmail.com> wrote: > Hi Dan, > > That worked! Thank you very much! So to clarify that means each time > when we ha...

Re: How to convert unix time stamp to SAS time stamp #6
> -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On > Behalf Of Lilian > Sent: Monday, January 05, 2009 4:18 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Re: How to convert unix time stamp to SAS time stamp > > 1231200312179 translates to 1/6/2009 11:05:12 > > Lilian, this should convert your timestamp, which seems to be 1000-ths of a second since 01jan1970. Sas_datetime = dhms('01jan1970'd,0,0,timestamp/1000); Hope this is helpful, Dan Daniel J. Nordlund Washington State Department of Social and Health Servic...

Re: How to convert unix time stamp to SAS time stamp #13
> -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On > Behalf Of Lilian > Sent: Tuesday, January 06, 2009 2:55 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Re: How to convert unix time stamp to SAS time stamp > > Hi Joe, > > Thanks for the macro, that make sense. I shall put that in testing. > Thanks all for your help! > > Just one last minor question, does anyone see why this expression > yield no returns? > dhms('01jan1970'd,11,0, timestamp/1000) >= datetime() > > I'm trying to make a compari...