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 (148614) 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 (148614) 5/19/2004 5:08:24 PM

Thank you very much for the help! :)

Sammy
0
Reply x9561 (148614) 5/20/2004 8:15:43 AM
comp.lang.labview 35384 articles. 14 followers. Post

2 Replies
851 Views

Similar Articles

[PageSpeed] 12/8/2014 9:24:15 PM


  • 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. ...

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...

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); --------------...

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. ...

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...

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 #2
What I think is, that the format is either wrong, or much too short. Which format did you use to display the values? Try datetime20. in SAS and you should see something. Maybe that's wrong, but after that you can convert it as Jack mentioned. Gerhard On Sun, 4 Jan 2009 20:46:38 -0800, Jack Hamilton <jfh@STANFORDALUMNI.ORG> wrote: >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 &g...

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...

How to read time stamps from a spreadsheet and calculate the difference between consecutive time stamps?
Hi, &nbsp; I am new to Labview. This question might be a joke to some of you here, but any help would be greatly appreciated. I have a spreadsheet with time stamps and power outputs from a generator. I am supposed to calculate the difference between consecutive time stamps, which will act as a delay for the next power output update that needs to be sent. For example, lets say that I have to following data: &nbsp; Time Stamp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&...

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...

Re: How to convert unix time stamp to SAS time stamp #5
11AUG08:06:00:00 (48+ years after the start of the epoch) is approximately 1.5E9. Your value is 1.2E12, approximately 1,000 times further away from the start of the epoch or close to AD 48,000. My Language Concepts manual says AD 19,900 is as far as you can go. I would guess that sql is giving you something other than seconds. Your value of 3155976000 prints as 03JAN2060:12:00:00 using datetime20. on my 9.1.3 system. -----Original Message----- From: Lilian Sent: Monday, January 05, 2009 3:13 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: How to convert unix time stamp to SAS time stamp Tried...

Re: How to convert unix time stamp to SAS time stamp #12
Show us the code that uses the expression. Are any of the values in your sql database supposed to be in the future? (Remember, earlier this morning is not in the future.) If you want values that occur earlier today, use datepart(dhms(...)) > today(). -----Original Message----- From: Lilian [mailto:lilian.chee@GMAIL.COM] 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 any...

Re: How to convert unix time stamp to SAS time stamp #11
> -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On > Behalf Of Nordlund, Dan (DSHS/RDA) > Sent: Tuesday, January 06, 2009 3:09 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: 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 ...

How to read time stamps from a spreadsheet and calculate the difference between consecutive time stamps? #3
Hi, &nbsp; I am new to Labview. This question might be a joke to some of you here, but any help would be greatly appreciated. I have a spreadsheet with time stamps and power outputs from a generator. I am supposed to calculate the difference between consecutive time stamps, which will act as a delay for the next power output update that needs to be sent. For example, lets say that I have to following data: &nbsp; Time Stamp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&...