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

Well this is how you do it. However, it doesn't seem to work with the month. There was a thread about this problem not too long ago. If you overflow the month in the date/time rec cluster (so it is greater than 12), date/time to seconds returns 0. Every other element works fine. You can add 1000 to the day and it will figure it out just fine. When this bug is fixed, this will work. Also, it might only be a bug in recent versions. I'm on 8.5 and it doesn't work right.
I realize this isn't a great answer to your question, but as far as I know, this is the easiest way to do what you want and have LabVIEW handle all the work.
Message Edited by Marc A on 10-03-2007 03:56 PM
Attachments:
Example_BD.png ‏2 KB

Similar Messages

  • ActiveMovie Control,Translating ActiveX calls from Visual Basic into Labview

    Hello,
    I want to use DirectX to display a movie. In the attached file is a Visual Basic example
    which I tried to translate into Labview.
    To play the movie IMediaControl from ActiveMovie control type library Version 1.0 C:\WINDOWS\system32\Quartz.dll) is used.
    To display the current Position I tried to wire the IMediaPostion. But I have no idea how to implement this in the Block Diagram.
    After opening it the following message is shown.
    Error 3005 occurred at Automation Open: Object specified is not creatable in Play Movie Current Possition.vi
    Attachments:
    Play_Movie_Current_Possition.vi ‏48 KB

    Hello Joe,
    the Windows Media Player has a lot of overhead. I also found it difficult to deal with the different Versions.
    I want to display data in a graph and show the connected video frame in a separate window.
    I used the QuartzTypeLib because it is on every Windows Computer and is easy to code in VB.
    With one call I can start the video in Labview., but I find no way to wire the current position. I do not really understand how ActiveX is implemented in Labview. I attached a LV 7.0 vi. I hope you can open it.
    Tiemo
    Attachments:
    Play_Movie_Current_Position.vi ‏63 KB

  • Passing Array of Srings between Visual Basic and Labview dll

    I have searched and searched for the correct way to pass an array of
    strings between Visual Basic 6.0 and a Labview 7 dll. So far, I still
    do not know how to pass the array. When I create the dll in LV, the
    array of strings is presented as a string, not an array. I am familiar
    with passing arrays of type double, but I really need to know how to
    pass an array of strings. Any and all help is appreciated.
    Bob

    Hey Bob,
    From what I understand, that can get kind of messy. You have to allocate the memory in VB in the format that LabVIEW expects (see the externalcode.h file in National Instruments\LabVIEW 7.0\cintools for details). Then pass a pointer to that location to LabVIEW. There are a couple of related examples online. They don't necessarily show how to pass an array of strings to VB, but they should show how to pass a string and an array. I hope this helps.
    Using Microsoft Visual Basic to Call LabVIEW DLLs That Pass String Data Types
    http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B123AE0CB9B0111EE034080020E74861&p_...
    Using Microsoft Visual Basic to Call LabVIEW DLLs That Pass Array Data Pointers
    http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3D9E556A4E034080020E74861&p_...
    Regards,
    Chris J

  • FI_GL_10 Data source- ECC5.0 - Delta -Time stamp

    Hi Guys,
    I need detail information on FI_GL_10 datasource and how delta is enabled for this also the time stamp details.
    Thanks in Advance
    Ramesh

    Delta Update
    After Images Marked for Deletion via Extractor (FI-GL/AP/AR)
    In the delta process, the DataSource transfers the record data with the new status in each case. For this reason, the data cannot be updated directly to the InfoCube. The update is only possible using the ODS object (update with MOVE).
    For safety, the delta process uses a lower interval setting of one hour (this is the default setting). In this way, the system always transfers all postings made between one hour before the last delta upload and the current time. The overlap of the first hour of a delta upload causes any records that are extracted twice to be overwritten by the after image process in the ODS object with the MOVE update. This ensures 100% data consistency in BW.

  • Extracting date and hour component from time stamp in diadem ?

    Hi all, 
    I am just getting started with DIADEM.
    I have a column with time stamp format as 4/12/2014  12:03:00 AM, i need to extract date and hour compenents only and store in another column.
    Can anyone please give me some lead on this?
    Please ask for extra infor if required

    Hi figured it out.
    I used this.
    str(chd(i,"P1_ACCH_1/Time_Stamp"),"#MM/DD/YYYY hh"))

  • Dates and convert to Unix Time Stamp using strtotime

    I kind of asked this before but now I really need this to work since I'm currently creating a form using the Update Record Form Wizard and the Date Picker to add/update/delete tour dates and this DB was created years ago and uses Unix Time Stamps to enter dates in the DB (example: 1202596733) and I know ADDT's date picker automatically doesn't support that format but there's got to be some way to incorporate the strtotime PHP command into either the add page or the tNG.dispatcher.class.php file. But how? Has anyone experimented with this previously? I was on another forum and they told me to add this:
    $timestamp = strtotime($_POST['tourdate']);
    to my code but they didn't tell me where and nothing seems to work in making it happen. Anybody got a clue?

    Hi Sean,
    You should be able to simply add the new directory to your include path. But this might fail if relative rather than absolute paths are used
    Indeed, ADDT internally uses relative paths at various places, e.g. the file "includes/common/KT_functions.inc.php" has function named KT_getSiteRoot(), where the variable $siteroot has the following value:
    dirname(realpath(__FILE__)) . '/../..';
    In addition many scripts are defining an absolute path to other scripts, e.g. the Captcha configuration file sets the global variable "KT_CAPTCHA_TEMP_URL" to "includes/common/_temp/.captcha/" -- means that moving the ADDT libraries to a folder like "includes/ssa/" will not work without modifying whatever ADDT script which uses such a hard-coded path, and there are plenty of them.
    Cheers,
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • Using a Visual Basic ActiveX DLL in LabVIEW

    I' like to use some code written in Visual Basic into LabVIEW. I think the best way to do this is making a dll_activeX. I've seen an example on NI site: http://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=B123AE0CB992111EE034080020E74861&p_node=DZ52048&p_submitted=N&p_rank=&p_answer=&p_source=External.
    When I use the dll present in the "zipped" file it works (I've registered the dll as described in the article).
    If I compile in a DllActiveX the Visual Basic project (Visual Basic 6.0), present in the zipped file, and I try to use, after the unregistrtion of the old one and the registration of new one, it doesen't work.
    I received the following error:
    error 3005Occurred at automation open: Object specified is
    not creatable in a ActiveX Dll with LabVIEW.vi
    Some ideas?
    Thank you.

    Paolo,
    I am not sure why you are getting the error. I downloaded the zip file re-built the dll and then registered it. I originally had LabVIEW open, so I closed and re-opened it so that it would see the new object. I then pointed the ActiveX refnum to the Project1 class. I still had a few broken wires so I hit ctrl-shift-Run Arrow to force a recompile.
    After all that I ran the VI at it worked great. Once that was done I unregistered it and ran the VI. I got an error as expected. I then re-registered the dll and ran it again. No error.

  • Microsoft Word Object Library does not find in add reference com visual basic 2008

    I didn't find the Microsoft Word Object Library On
    the COM tab, in visual basic 2008
    how i can add it.
    my purpose that i want to add word in my project and can view and edit in it.

    I didn't find the Microsoft Word Object Library On
    the COM tab, in visual basic 2008
    how i can add it.
    my purpose that i want to add word in my project and can view and edit in it.
    Maybe dumb question from me, but is Microsoft Word installed on the machine?
    AFAIK, you can (optionally) install the "Primary Interop Assemblies" when installing Word. (see also: How to: Install Office Primary Interop Assemblies)
    Armin

  • 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

    do u mean this?
    Ian F
    Since LabVIEW 5.1... 7.1.1... 2009, 2010
    依恩与LabVIEW
    LVVILIB.blogspot.com
    Attachments:
    TimeStr2Num.vi ‏19 KB

  • Time stamp to number function

    The Conversion VIs and Functions palette has a function that converts the number of seconds elapsed to a time stamp (To Time Stamp Function).  I need to go in the other direction, from a time stamp to a double (number of seconds elapsed since 12:00 a.m., Friday, January 1, 1904 Universal Time).  Does anyone have a function to do this?  I've tried to type cast with no success.
    Steve Hall
    [email protected]
    Solved!
    Go to Solution.

    Just use the To Double Precision Float function. It's polymorphic and it will accept a timestamp to return the number of seconds since the LabVIEW "zero-time".

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

  • Conversion from Excel time to labview time

    Hello all,
                                       I want to convert the excel time stamp to labview time stamp. Can you all please help me how to do this ?
    In my application labview time is 05-11-12 14:56:00 and its equivalent excel time representation is 41218.6222222222.
    I tried this formula,
    Labview time =  24*3600*(Excel time - 1460) but anwer is wrong.
    Thanks.
    Kudos are always welcome if you got solution to some extent.
    I need my difficulties because they are necessary to enjoy my success.
    --Ranjeet

    Ok, here's what I found.  The conversion is:  Time Stamp = 86400*(Excel Time - 1462).  But here's the kicker: the timestamp is GMT.  You have to add your time zone offset as well.  I'm in the Eastern Time Zone, so I had to add 5 hours.  I'm not sure what DST will do to this.  I'm sure there's ways around it, I just don't have time to look into it more right now.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    Excel Time.png ‏10 KB

  • Seperating time and date from time stamp

    Hai,
          Can somebody tell me how time and date are seperated from a time stamp with format  like 12/01/2006 1:21:36
    I want 12/01/2006 in one object and 1:21:36 in another object.
    Also as BW takes only format YYYYMMDD, does having 12/01/2006 make any difference? If yes then how can I convert this?
    Thank you.

    Hi Visu,
    For converting date check these:
    Re: Date Conversion in Flat File
    Bye
    Dinesh

  • Precise time stamping of serial data

    I am having trouble with precise timestamping  of incoming serial data recived on 4 ports using 4 separate threads that continually attempt to read a byte.
    When the expected frame is recieved the data is tagged with a time stamp.
    The issue seems to be windows xp or the serial ports themselves.  I am using an xsens serial to usb, 2 lavaport serial cards and the built in serial port.
    Any suggestions for precise timing?

    there is some hints:
       -for milisecond precise timestamp, you can use GetLocalTime,GetSystemTime or GetTickCount.
        But to achieve true milisecond scale, you need use timeBeginPeriod(1)/timeEndPeriod(1) otherwise you get 10-16ms scale depend on system
        (please read help pages on msdn for timeBeginPeriod function)
       - create your program to not use CPU too much(no pooling,just message and/or sync wait),
         or even better, do not run any other apllication which consume lot of CPU/DISK resources on the same PC
       - for serial communication (but this also depend on baud rate) you can try to set send/receive driver buffer to 1 (from windows device manager)
       - try different serial port card/converter(with different drivers)
       - if still need something to try, set higher process and thread priority (SetPriorityClass,SetThreadPriority)
    After all of this, on windows, there are no precise timing.Even if you do everything you can do, there is still chance to get time gap, but you can detect it (in milisecond precision)

  • Generic Data Source Delta on Time Stamp Issue

    HI,
    I had a Z datasource on a Z table with Time stamp
    The Generic delta of the Data source is based on Time stamp with Upper Saftey Intreval 1Sec
    When i extract delta consutively with 1 Hr  gap i am getting an delta evn tough the table is updated with etries
    How to investigate & resolve the issue
    Thanks

    Hi
    please elaborate question is not clear.
    Ashish

Maybe you are looking for

  • Tax classification

    hi! how to create tax classification settnigs in billing of sales area data section of Customer Master. thankyou

  • Why wont my library transfer?

    Hi, I'm trying to transfer my library from my iPhone onto my new laptop as some songs are not on my laptop..although i dont know why as i copied all my itunes library from my other laptop. Its annoying as i know cant sync my phone with my new laptop.

  • Early 2008 Mac Pro:  Add larger internal hard drive?

    ref: Early 2008 Mac Pro The original tech specs specify the use 4 1T internal hard drives. Can I use a 2T hard drive in the internal bays instead?

  • HP eprint account

    I keep getting error message Ajax submit failed error 403-forbidden when rying to set up a Deskjet3050A.  

  • CS6 updates - download once, install twice - how?

    I have CS6 Master Collection running on 2 machines (desktop and laptop) both with Windows 7. This is not a licensing question. I understand that I can run my purchased software on my own 2 personal machines. I am on limited bandwidth and after my ini