Time stamps in Seconds from Epocho

Hi,
I have a requirement, where I need to calculate the Time stamp for sy-datum.
That is. I have to calculate the number of seconds from 01/01/1970.
www.unixtimestamp.com
gives more infor. But how do I do this in my report?

Hi Jurgeon,
The function module I used is 'L_MC_TIME_DIFFERENCE'. This gives time difference between two dates and time in minutes. I later converted this to seconds by multiplying by 60.
Thanks for your suggestion.
Thanks,
Chaith.

Similar Messages

  • Time stamp dropping seconds

    I figure someone has had this problem before but didn't see it in the forum anywhere.  I'm adding a time stamp to a file so I've used the "Get Time/Date in Seconds" and wired that to a "Convert to DBL".  This then wires both into an indicator on the Front Panel and into the "Write to Measurement File" Express VI.
    The indicator displays the time stamp just fine but in the file it puts it into scientific notation and cuts off the last 4 digits as well as any fractional seconds.  The time stamp writes to the file every 5 seconds so it is important to have the rest of the time stamp included.  I've tried using probes on the wires to see where things go weird but I get the same truncated value in the wire before and after the indicator.  I thought it had something to do with the Express VI first since the indicator is fine but with it truncated in the wire it seems that the Express VI is indeed saving exactly what is handed to it...but then again the indicator...you can see I've been running in circles over this!  Does anybody know the reason it is doing this and a possible solution?
    Thanks a lot!
    Solved!
    Go to Solution.

    I can't post the exact code because it is being developed for use outside our lab but I've recreated the basics of the problem.  The array would be the collected data and except some filename details and things like that everything relevant to the time and saving is included.  Also settings in the express VI are the same.  Not sure if it will help out.
    Attachments:
    example.vi ‏56 KB

  • Add Date and Time Stamp to video from AVCHD folder

    New to this software and forum, so I apologize if this has been asked and answered. I am trying to insert the date and time metadata from the AVCHD folder using the .mts clips. Curently I am using VaTS to stamp the video then render the clips through Power Director. I would appreciate any help on this topic. Thank you for your time

    BenB, thanks for responding to both of my posts. The footage was shot using a Sony HDR-XR500 AKA consumer video camera. Date and time is not burned into the image when captured digitally. The only way to do it would be to run the video through a video capture device that basically just records what the video outputs. This solution really ***** so i'm looking for somthing more effective.

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

  • Problem in Using Time Stamp when Querying from SQl Server to ODBC linked server

    I am using Following Query for my subject pupose but facing different Issues, Error Also shown after Query
    Query IS:
    DECLARE @sql varchar(8000)
    SELECT @sql = 'SELECT * FROM OPENQUERY(TEST, ' +
                  '''SELECT * FROM SCHEMA.OAUSER.Tag_Value ' +
                  'WHERE Tag_id = ''''GROUP_1SEC.COOLING_TOWERS.MOTORS.AG001.CURRENT.CV'''''+
                  ' AND timestamp = ''''{ts ''''2014-z02-18 15:28:38'''' }'''''')'
    PRINT @sql
    EXEC(@sql)
    And i am getting this Error:
    OLE DB provider "MSDASQL" for linked server "TEST" returned message "[DataDirect][OpenAccess ODBC]Syntax error in SQL statement. syntax error line 1 at or after token <2014>.".
    Msg 7321, Level 16, State 2, Line 1
    Please Guide me.
    Regards;
    Siraj

     Sorry "Z" was written by mistake
    I am using :
    DECLARE @sql varchar(8000)
    SELECT @sql = 'SELECT * FROM OPENQUERY(TEST, ' +
                  '''SELECT * FROM SCHEMA.OAUSER.Tag_Value ' +
                  'WHERE Tag_id = ''''GROUP_1SEC.COOLING_TOWERS.MOTORS.AG001.CURRENT.CV'''''+
                  ' AND timestamp = ''''{2014-02-18 15:28:38}'''''')'
    PRINT @sql
    EXEC(@sql)
    And Getting this error:
    OLE DB provider "MSDASQL" for linked server "TEST" returned message "[DataDirect][OpenAccess ODBC]Error getting the literal value of right operand.".

  • How to Convert a 'Time Stamp' field to Date......?

    Hello Gurus:
    I am using a Generic Extractor to pull some stats data.  One of the field is a Time Stamp field, which tells me the date and time of Transaction run.  I only need "Date".  I tried mapping the stamp field to Date info-object hoping for a automatic determination of the Date.... (like the Week, Month happens).   Well, I was wrong! 
    I only need the Date part.  How can I do this in BI?  is teher a specific SAP info-object for this that could be used..?  If not, what would be the routine.  The Date field that comes in is a SAP format... "u201C20,070,505.0000000u201D meaning the Transaction was run
    on 05/05/2007.  How can I get this convertion in BI transaformation??  is there a special Routine...?
    Also, we are trying to use "Time Stamp" based DELTA from a generic extraction.  The field used is a System date with time stamp.  Value looks like u201C20100,505,170,113.2918470u201D, u201C20100,505,170,113.4748820u201D  Every record pulled has a different value... probably giving me the time at which the record was created or generated.  Now, with DELTA specifid on this type of field, what will be the 'Current Status" value in Delta queue?  Is it based on the last record created and will that be the highest value?  For next Delta extraction, does it compare the extraction time stamp to this value and bring in those records that are greater than the 'Current Status" value?  I guess with that we can have as many deltas as we want..... right??  is there any particular setting I should be doing or worried/ careful about setting etc....?
    Thanks for the response in advance....
    Best..... SMaa

    Thanks Akshay,
    Your suggestion worked right away and was probably the easiest of all.  I tried the Function Module that Pravender suggested,
    but it did not return me the date back.... may be because it does not need the Micro Seconds in it....?  Routine as suggested by
    Satyam might work too, but did not go there....! 
    Thanks to all of you.
    Best..... SMaa

  • Odd, Partial Time Stamp Corruption

    This seems to be affecting only one project, which is the most recent one I created and the one where I have been recently working in Aperture, organizing, rating, adjustments, etc.  56 out of 327 images now have a date/time stamp of about 32 or so hours after they were actually taken. They were all taken Saturday morning but now read as if they were taken Sunday evening.
    Here are the details:
    All of the affected images are rated 5 stars, but not all 5-star photos were affected (there were 97 5-star images in total). Of the 56 that were affected,  54 had their time stamps moved, as I said to a point roughly 32 hours after they were taken, and those images now have time stamps all within a 2 minute period, spaced 2-3 seconds apart. In fact, they were taken over a 2-hour time frame, so they did not all just get corrupted/adjusted in an orderly similar fashion.
    This means I cannot just figure out a single time adjustment and move them all back to the correct point.
    The other 2 images were corrupted/adjusted to a time about 1 hour and 20 minutes later than the other 54. As it happens, I used 2 cameras for the project, and the 54 images were taken with camera 1, and the other 2 images were taken with camera 2.
    I was having computer trouble Sunday evening, and it is possible that Aperture and/or my computer crashed at around the time the images were moved to. I also probably had Aperture set to display only 5-star images when it crashed. But, as I've noted the images were not all moved to a single time, so a theory that they were all moved to the time of the crash seems less likely.
    Earlier I did intentionally adjust the time stamp on images from both cameras. This was done because one camera was set to the wrong time zone from a recent trip, and then I wanted to sync the time stamps more exactly since I integrated images from 2 cameras into one project. I did this on Saturday and things seemed to be fine until now.
    I do not know when the corruption hapened. I just noticed it this morning (Tuesday). Things definitely seemd fine on Sunday. Yesterday I briefly worked with a few of the images and didn't notice anything amiss but I might have just not noticed.
    No metadata or EXIF data, or adjustments seem to be similarly corrupted. Only the time was affected.
    Here's the thing: I can live with this in this project. I'd rather things be in order but it is not critical. But I'd love to figure out why it happened and how, if possible to fix it in case it might affect a different project where actual and relative time stamps are more critical. Thanks.
    iMac 27 inch mid-2010, OS X 10.8.4, Aperture 3.4.5

    Thank you for your response, Jeremy. The reason I asked about Real-Time, and if you were using variables is that there are some options to enable timestamps inherent to both that OS and those communication methods. However, if you are simply writing to the onboard flash, that eliminates both of those alternatives.
     As far as I can tell, there seems to be nothing wrong with the code you are using for generating the timestamp. That being said, the behavior you are seeing could be due to the VI not being successfully run with each iteration of data acquisition, or the VI losing its connection to the NIST server (and therefore maintaining the last known value, and therefore the same timestamp as the previous iteration).
    You said that up to this point, the time has been spot on with the UTC. Has anything changed since then that might result in either of these two scenarios? Thanks!
    ~kgarrett
    Applications Engineer
    National Instruments

  • Time stamp to excel sheet

    I want to print time stamp every second to an excel sheet, tried 1000 of times to add row to the sheet but failed, any clue how to?
    Attachments:
    time stamp in a row.vi ‏67 KB

    That's because you're wiring the N value of the for-loop to the "column" element of the cell cluster, and you are wiring a constant of 1 to the "row" element of the cluster. You also have several issues with the code:
    Do NOT hard-code a path the way you are doing. What will happen if someone else tries to run this code? What will happen if it runs on another computer that has Windows XP? Use a control and set it to a default value if you want.
    No error handling whatsoever.
    Do not use integer constants in lieu of enumerations. The VIs you are calling have parameters for which enumerations are provided. Use them. Right-click on the inputs and select Create->Constant. This will create the enumerations for you. They are self-documenting.
    Do not have a time delay that cannot be bypassed if there is an error. You are running the loop 500 times. What will happen if there's an error on iteration 20? The loop still has to run 480 times, forcing you to wait 480 seconds before you can stop.
    Be aware that timestamps between LabVIEW and Excel are different, since they use different epochs. This has been discussed ad nauseam in these forums, so do a search and you will find out how to deal with this.
    See attached modification as a starting point. You should also review the LabVIEW training materials. To learn more about LabVIEW it is recommended that you go through the introduction material, tutorial(s), and other material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. There are also several Technical Resources. You can also take the online courses for free.
    Attachments:
    time stamp in a row MOD.vi ‏79 KB

  • Split in stock transport order due to different time stamp in STR

    Hi,
    Deliveries created for stock PO's are splitted due to time stamp per seconds in the Stock PO. This originates due to timestamp set on the Stock transfer requisition created in APO. In this case several Stock transfer requisitions are consolidated to one Stock transfer order which is OK but it creates several deliveries due to the times stamp (split on seconds per day).
    Request to suggest the way to avoid split of delivery due to time stamp.
    With regards,
    Mrinal

    Found an user exit to remove time to avoid split on time.

  • Get Time Stamp will milli seconds from string time stamp format

    Hi Guys,
    I am trying to get the time stamp with milli seconds value from string format time data,
    Attached the snippet (Get milli seconds to Time stamp)I  tried.
    Attached Sub VI Convert string to time stamp
    When run,I am not getting the time string indicator with milli seconds value even though the format have <%2u> .
    please guide me on this.
     ..AND Finally i will be converting the date and time string output to time stamp data type
    Attachments:
    Convert_String_to_TimeStamp.vi ‏13 KB
    Get Milli seconds to Time stamp.png ‏25 KB

    You do realize you could have just used a single Scan From String to get the timestamp, right?
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    Get Timestamp.png ‏43 KB

  • Transfer time stamp from text file into MS Access thru Labview

    Hello everyone,
    I am Cruz; Long time listener, First time caller.
    I am currently monotoring data being collected by an oven. The data is stored in a text file. I am using Labview to take the data from the textfile and place it in an MS access DB for manipulation. The first three columns of the text file are the time stamp of data. When i transfer the data into Access i cant get the first three columns to display as a time stamp. Can have some pointers on what how to get the first three columns to display correctly.
    Additional info:
    the text file is a 1D array that gets overitten with every new mesurement tanken. the transfer to Acces is to not loos any of the information and to better manipulate the data into forms and such.
    Running Labview 2010
    attached is code and text file.
    Any help is greatly appreciated.
    Attachments:
    Oven test other.vi ‏16 KB
    datalog032010003.txt ‏1 KB

    Your first mistake is reading the file as DBL. Your first three columns are obviously not numeric values. Did you ever look at the output array? Read it as strings. Second, you would need to combine those first three columns to create an actual time stamp before you write to the db. Unless of course you have one column for date, one column for time, and one column for AM/PM. I would not recomend that type of structure in the db.

  • 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

  • Time stamp conversion and graphs from array data

    How can you read time stamps and data currently in an text file as an array and split in for display on a graph. I think I need to convert the time stamp back into seconds to do this but not sure how to do so?

    If you're using 8.2, the Read From Spreadsheet File VI can read string files. If not, you will need to open the VI and read the instruction on the diagram for how to change it.
    Once you have your string array, you can use the VI found here to convert the time column (note - read the thread) and convert the second column using the String to Number functions.
    Try to take over the world!

  • Time stamp from dynamic data

    I trying to write dynamic data to a file using Express VI (Write LabView Measurement file). The dynamic data comes straight from a simulated Signal Express VI. The signal part of the dynamic data is written correctly but the time stamp is what appears to be float counting the seconds since the Write LabView Measurement file Express VI was started.
    I have configured the Simulate Signal VI Time stamp to absolute data and time option.
    This should be dead simple but it just do not work!
    Any suggestion to what I might do wrong?
    I do expect that the time stamp would be written as two columns one for date and one for time.
    Thanks,
    Soren T. Jensen

    The timestamp is written in the header of the file. The time and date entered there is the time and date that you are looking for. The timestamp written next to each piece of data is indead a relative value. It is the delta from the timestamp in the header to the time that datum was collected (created). The reason for this is that timestamps are quite large in bytes, especially if you break out the time and date in strings. Just stamping the header and providing the offsets is much more efficient.
    If you choose to not provide a header, I think that the timestamp will be lost entirely. I think that this is probably wrong, but I am uunsure what should be done to correct it.
    Hope that this helps,
    Bob
    Bob Young - Test Engineer - Lapsed Certified LabVIEW Developer
    DISTek Integration, Inc. - NI Alliance Member
    mailto:[email protected]

  • Restore iPhone from archived, time-stamped backup

    Hi all,
    Long story, but after having the battery of my iPhone 5 replaced I now need to restore from an archived, time-stamped backup that iTunes created when I last restored my Phone.  Current iTunes version, IOS 8.1.3, up-to-date Windows Vista. 
    I can't figure out how to get iTunes to see that backup and let me use it ... only the current incremental backup is visible in iTunes.
    Any help will be hugely appreciated!  TIA - John

    Uninstalling & reinstalling iTunes won't have any benefit.
    Assuming you haven't done it already go to Edit > Preferences > Devices and tick the box against Prevent iPod, iPhones, and iPads from syncing automatically.
    How many folders are listed under %AppData%\Apple Computer?
    How many backups under Edit > Preferences > Devices?
    This is how my three backups are represented by three folders:
    Assuming there are two folders, but only one backup listed I would close iTunes, copy the entire Backup folder to another location for security, then rename the folders so that the dated folder replaces the current one. In the example above I would probably add -Bad to the second folder name, and then remove -20141204-010305 from the third. When you restart iTunes it should be possible to restore the data from your older backup set.
    tt2

Maybe you are looking for

  • Materialized view or a big table

    Hi all, In our project based on Documentum we are expecting to store 140 million of invoices of third party consultant companies in our Oracle 10g database. We received two different approaches from data modeling team. First is in order to speed up t

  • Why i can't execute jar files

    Greetings I read that jar files are executable unpon clicking them, but with me it do nothing. right now i'm using the command prompt to decompress jar files jar -xf jarfile.jar i have windows xp professional with j2sdk1.4.1

  • Outbound Delivery Output Type Rounded Value

    Dear All, The question is, I have an Outbound output type defined and currently in use. No routine is assigned. The problem here is in delivery, Material A with Delivery Quantity: 15.880 kg. But when printing the output, the Delivery Quantity has bee

  • Some songs won't copy to Ipod from Itunes

    Hello all, A bunch of songs won't transfer to my ipod and I can't figure out why... Exact message: "Some of the items in the Itunes Library, including "..." were not copied to the iPod because they cannot be played on this iPod" Then it says there ar

  • Error thrown : Context must be instance of org.apache.cocoon.environment.

    I am trying to load a jsp page in my application(struts application). The jsp uses jsf and is loaded from the application mentioned. My web.xml has the following entries: <web-app>   <listener>     <listener-class>MyListener</listener-class>   </list