Adding a date and a time to create one channel in a data plugin

I would like to preface this question with the fact that I am new to VBS programming.  What I want to do is create a plugin. Most of it is done but I am having a problem with adding two times to make one.  I have a text file that stores the date and time separated by a tab.  This file format was design for excel.  When I bring it in both the date and time are in different channels and I can't figure out a way to add the two and either replace one of them or even place it into a separate variable.  Below is an example. 
Chan(1) contains the date, Chan (2) contains the time.  This statement that places the data into the channel is:     
Set StandChannels(0).Values(k) = Chan(1).Values(i)
I have tried:
Set StandChannels(0).Values(k) = Chan(1).Values(i)+Chan(2).Values(i)
error: Object doesn't support this property or method
or
Chan(1).Values(i) = Chan(1).Values(i)+Chan(2).Values(i)
error: Object doesn't support this property or method
I have tried many other iterations and have not had any success.  This seems to be an easy task I am probably missing something simple.
Solved!
Go to Solution.

Chris and Brad,
Sorry I didn't respond sooner.  I tried the suggestion on the code and it made sense seeing it but I could not get it to work within the code.  I am enclosing the code and the file.  I would like to explain that the plugin is currently design to accept two different file versions.  I have sent you the newer file version.  I received an initial plugin from a coworker that I believe came from NI and which accounts for the frame work and I modified it a great deal to get it to this point.  I appreciate your help; it has been somewhat frustrating not completely understanding the different types of channels, how to access the information needed, and finding examples of what I wanted done.
Elias
Attachments:
MSN#19 Mon, Oct 18, 2010 1-29 PM_NI Version.log ‏11 KB
log_data_plugin_101510.txt ‏48 KB

Similar Messages

  • Error "Conversion failed when converting date and/or time from character string" to execute one query in sql 2008 r2, run ok in 2005.

    I have  a table-valued function that run in sql 2005 and when try to execute in sql 2008 r2, return the next "Conversion failed when converting date and/or time from character string".
    USE [Runtime]
    GO
    /****** Object:  UserDefinedFunction [dbo].[f_Pinto_Graf_P_Opt]    Script Date: 06/11/2013 08:47:47 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE   FUNCTION [dbo].[f_Pinto_Graf_P_Opt] (@fechaInicio datetime, @fechaFin datetime)  
    -- Declaramos la tabla "@Produc_Opt" que será devuelta por la funcion
    RETURNS @Produc_Opt table ( Hora datetime,NSACOS int, NSACOS_opt int)
    AS  
    BEGIN 
    -- Crea el Cursor
    DECLARE cursorHora CURSOR
    READ_ONLY
    FOR SELECT DateTime, Value FROM f_PP_Graficas ('Pinto_CON_SACOS',@fechaInicio, @fechaFin,'Pinto_PRODUCTO')
    -- Declaracion de variables locales
    DECLARE @produc_opt_hora int
    DECLARE @produc_opt_parc int
    DECLARE @nsacos int
    DECLARE @time_parc datetime
    -- Inicializamos VARIABLES
    SET @produc_opt_hora = (SELECT * FROM f_Valor (@fechaFin,'Pinto_PRODUC_OPT'))
    -- Abre y se crea el conjunto del cursor
    OPEN cursorHora
    -- Comenzamos los calculos 
    FETCH NEXT FROM cursorHora INTO @time_parc,@nsacos
    /************  BUCLE WHILE QUE SE VA A MOVER A TRAVES DEL CURSOR  ************/
    WHILE (@@fetch_status <> -1)
    BEGIN
    IF (@@fetch_status = -2)
    BEGIN
    -- Terminamos la ejecucion 
    BREAK
    END
    -- REALIZAMOS CÁLCULOS
    SET @produc_opt_parc = (SELECT dbo.f_P_Opt_Parc (@fechaInicio,@time_parc,@produc_opt_hora))
    -- INSERTAMOS VALORES EN LA TABLA
    INSERT @Produc_Opt VALUES (@time_parc,@nsacos, @produc_opt_parc)
    -- Avanzamos el cursor
    FETCH NEXT FROM cursorHora INTO @time_parc,@nsacos
    END
    /************  FIN DEL BUCLE QUE SE MUEVE A TRAVES DEL CURSOR  ***************/
    -- Cerramos el cursor
    CLOSE cursorHora
    -- Liberamos  los cursores
    DEALLOCATE cursorHora
    RETURN 
    END

    You can search the forums for that error message and find previous discussions - they all boil down to the same problem.  Somewhere in your query that calls this function, the code invoked implicitly converts from string to date/datetime.  In general,
    this works in any version of sql server if the runtime settings are correct for the format of the string data.  The fact that it works in one server and not in another server suggests that the query executes with different settings - and I'll assume for
    the moment that the format of the data involved in this conversion is consistent within the database/resultset and consistent between the 2 servers. 
    I suggest you read Tibor's guide to the datetime datatype (via the link to his site below) first - then go find the actual code that performs this conversion.  It may not be in the function you posted, since that function also executes other functions. 
    You also did not post the query that calls this function, so this function may not, in fact, be the source of the problem at all. 
    Tibor's site

  • What is a Token Data String and how do I create one?

    How do I create local server scripts? I have read Chapter 2, what is a data string, how do I 'create' one and how can I 'pass' this off Apple, iTunes, whoever needs it? Chapter 2 doesn't say.
    Gateway   Windows XP Pro   Military

    I suggest that you grab a copy of Chapter 4 of the Admin document. It explains a lot. You should also grab a copy of Apple's sample scripts (you get some C code, Java, Perl, Python, and a shell script). They will give you some idea of how this works. The scripts are downloadable frmo the iTunes U support page.
    Basically, the token string contains a credential that says what access you'd like to have in iTunes U (you are an "Admin" user or a "Student" or an "Instructor" say). The credential encodes what you can view/edit in a standard way. The credential also includes some optional info (like your identity, e-mail address ... a "user identifier" which is typically a number ... say if you identify users by numbers and names ... and other stuff). You then slap on a timestamp on the credential and cryptographically encode it with that shared secret Apple sent you (when I say "you," I mean that funky CGI you've written ... your CGI does all the encoding). When you're done with the token string, you slap it on the end of a site URL (again, this is something Apple sent you) and send it to Apple. This way, you ('er, your CGI) does all the authentication for Apple (because you know how to authenticate your users better than Apple ever will).
    I confess I had to read Apple's documents, oh, like twenty times before I figured all this stuff out. Once you get it though, it will seem like a pretty cool system.
    MacBook Pro   Mac OS X (10.4.8)   I lied. I'm running Leopard

  • Keyboard shortcuts: current day and date, and current time?

    I would like to know keyboard shortcuts for entering current day and date, and current time (separated entries) in Numbers. Something that Excel does easily. Thank you, Ian

    Ian,
    Numbers does not have predefined key command for Insert Date & Time as you can see from this screenshot:
    All menus show the key commands on the very right (if there is a ke command).  You can add you own, custom, key commands by opening system preferences and selecting the Keyboard panel, then the "Keyboard Shortcuts" segment:
    Click the "+" then a modal dialog will appear.   Select the application from the pop, then enter the exact name if the menu item, and, finally, your desired key combination:
    You can do this for any application

  • BAPI for changing delivery date and delivery time fields in LIKP table

    Hi All,
         Is there any BAPI or function module to change the delivery date and delivery time in LIKP table ?
    Please tell me experts if exists.
    Thank you,
    Raghu.

    try these:
    BAPI/FM to update LIKP and VTTK tables
    http://sap.ittoolbox.com/groups/technical-functional/sap-dev/bapi-for-changing-sales-headertable-likp-662800

  • Conversion failed when converting date and/or time from character string

    Hi experts,
    I'm trying running a query in Microsoft Query but it gives the following error message:
    "conversion failed when converting date and/or time from character string"
    when asks me the data I'm inserting 31-01-2014
    i've copy the query form the forum:
    SELECT T1.CardCode, T1.CardName, T1.CreditLine, T0.RefDate, T0.Ref1 'Document Number',
         CASE  WHEN T0.TransType=13 THEN 'Invoice'
              WHEN T0.TransType=14 THEN 'Credit Note'
              WHEN T0.TransType=30 THEN 'Journal'
              WHEN T0.TransType=24 THEN 'Receipt'
              END AS 'Document Type',
         T0.DueDate, (T0.Debit- T0.Credit) 'Balance'
         ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')<=-1),0) 'Future'
         ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')>=0 and DateDiff(day, T0.DueDate,'[%1]')<=30),0) 'Current'
         ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')>30 and DateDiff(day, T0.DueDate,'[%1]')<=60),0) '31-60 Days'
         ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')>60 and DateDiff(day, T0.DueDate,'[%1]')<=90),0) '61-90 Days'
         ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')>90 and DateDiff(day, T0.DueDate,'[%1]')<=120),0) '91-120 Days'
         ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,'[%1]')>=121),0) '121+ Days'
    FROM JDT1 T0 INNER JOIN OCRD T1 ON T0.ShortName = T1.CardCode
    WHERE (T0.MthDate IS NULL OR T0.MthDate > ?) AND T0.RefDate <= ? AND T1.CardType = 'C'
    ORDER BY T1.CardCode, T0.DueDate, T0.Ref1

    Hi,
    The above error appears due to date format is differnt from SAP query generator and SQL server.
    So you need convert all date in above query to SQL server required format.
    Try to convert..let me know if not possible.
    Thanks & Regards,
    Nagarajan

  • SAP query error - 1). [Microsoft][SQL Server Native Client 10.0][SQL Server]Conversion failed when converting date and/or time from character string.  'Received Alerts' (OAIB)

    SAP query error - 1). [Microsoft][SQL Server Native Client 10.0][SQL Server]Conversion failed when converting date and/or time from character string.  'Received Alerts' (OAIB)
    SELECT    
    CASE WHEN T0.DocStatus = 'O' THEN 'OPEN'
    WHEN T0.DocStatus = 'C' THEN 'CLOSED'  END  AS 'Document Status',
    T0.DocDate AS 'Posting Date',
    T0.DocNum AS 'Doc.No',
    T0.NumAtCard,
    T0.TransId AS 'Trans. No.',
    T0.Comments AS 'Remarks',
    T0.CardCode AS 'Offset Acct',
    T0.CardName AS 'Offset Acct Name',
    sum(T0.DocTotal) + (T0.WTSum) as 'DocTotal',
    T3.DueDate AS 'Cheque Date',
    T3.CheckSum AS 'Amount'
    FROM         ODPO AS T0 LEFT OUTER JOIN
                          VPM2 AS T1 ON T0.ObjType = T1.InvType AND T0.DocEntry = T1.DocEntry LEFT OUTER JOIN
         OVPM AS T2 ON T2.DocEntry = T1.DocNum LEFT OUTER JOIN
                          VPM1 AS T3 ON T2.DocEntry = T3.DocNum
    where T0.DocDate>='[%0]' and T0.DocDate<='[%1]'

    Hi,
    Try this:
    SELECT   
    CASE WHEN T0.DocStatus = 'O' THEN 'OPEN'
    WHEN T0.DocStatus = 'C' THEN 'CLOSED'  END  AS 'Document Status',
    T0.DocDate AS 'Posting Date',
    T0.DocNum AS 'Doc.No',
    T0.NumAtCard,
    T0.TransId AS 'Trans. No.',
    T0.Comments AS 'Remarks',
    T0.CardCode AS 'Offset Acct',
    T0.CardName AS 'Offset Acct Name',
    sum(T0.DocTotal) + (T0.WTSum) as 'DocTotal',
    T3.DueDate AS 'Cheque Date',
    T3.CheckSum AS 'Amount'
    FROM         ODPO  T0 LEFT OUTER JOIN
                          VPM2  T1 ON T0.ObjType = T1.InvType AND T0.DocEntry = T1.DocEntry
    LEFT OUTER JOIN
         OVPM  T2 ON T2.DocEntry = T1.DocNum LEFT OUTER JOIN
                          VPM1  T3 ON T2.DocEntry = T3.DocNum
    where T0.DocDate >= '[%0]' and T0.DocDate <='[%1]'
    group by T0.DocStatus,T0.DocDate ,
    T0.DocNum ,
    T0.NumAtCard,
    T0.TransId ,
    T0.Comments ,
    T0.CardCode,
    T0.CardName ,
    T0.WTSum ,
    T3.DueDate ,
    T3.CheckSum
    Thanks & Regards,
    Nagarajan

  • Last Logon date and Logon time not updating in table USR02

    Hi,
    Please help us on this. After customer successfully logged in the webshop, we are checking the table USR02 in CRM system and the Logon date and Logon time is not updated. Because of this, the customer will be locked after certain number of days. When we check it in ECC system, customer's last logon date and time is updated. Can you tell us what could be causing this? Any advise what we need to check? Thanks in advance!
    Regards,
    Mike

    Hi
    1. Please check if the USAPPLREF table in ECC has the correct mapping done between the LOGON User and the Sold-to party (Customer)
    2. Please check the validity of those user in SU01 user data.
    3. Please check the USERS data from the USERADMIN Link (if it is configured in your scenario through XCM settings for USERS)
    Hope this will help.
    Regards

  • When firefox checking for updates and updates found but due to proxy restrictions it unable to download the updates then it continue trying to download that and this time it creating problem on running javascript

    When firefox checking for updates and updates found but due to proxy restrictions it unable to download the updates then it continue trying to download that and this time it creating problem on executing javascript and raising errors.

    What are the error messages you are seeing?

  • The date and the time of printed of purchase order

    Hi,
    Wich field can me watch the date and the time of printing document like purchase order
    Thanks in advance

    Dear,
    CreateDate:Print date in OPOR
    DocTime is Print Time in OPOR

  • Changing date and/or time of photos

    I often change the time of individual iPhoto pictures to change their order in the photo Library.
    I change the date and or time in the information section. I have iPhoto sort the photos by date.
    I just imported about 1200 photos from a DVD and want to change the order of some of them, but when I change the time, the new time stays there, but the photo either does not move or moves to the incorrect place. I have closed and reopened iPhoto and even restarted the computer.
    I would appreciate any help or suggestions.
    Thanks in advance.

    Try using the Photo menu ==> batch change date and time (if the photos either do not have a data and time or they are not in the date time sequence you want or the adjust date and time (if you want to add a constant amount to all photos selected keeping them in the same date/time sequence but with a different date and time - and select the change the original option
    LN

  • Why does my iPod say Connot connect to the iTunes store when my iPod is up to date and the time zone is okay

    why does my iPod say Connot connect to itunes store, when my iPod is up to date and my time zone is okay?

    Hey Hiika,
    Do not forget to check the Date and Time and make sure that it is set to Automatically. Check out the article below to troubleshoot your issue further.
    Can't connect to the iTunes Store
    http://support.apple.com/en-us/HT201400
    Take care,
    -Norm G. 

  • What do the dates and the times on the data sheet mean?

    what does the dates and the times on the data sheet mean?

        marcus19541
    We definitely want to make sure that your data usage reporting is clear so you can monitor everything clearly! The timestamps that appear when viewing your data usage details on My Verizon may not be the exact time that data was completely used. The corresponding usage and time reflect usage from between the last report and the one you're reviewing.
    For example, say there was a report for 312MB at 2AM and the report right before that was for 100MB at 6PM. The 312MB were used between the 6PM report and the 2AM of it's own time stamp.
    Please let us know if you have any further questions about your data usage!
    RuthW_VZW
    Follow us on twitter @VZWSupport

  • TS3579 I found this useful because I did not know about the effect of typing in data and that you could only drag to rearrange the data.  I had typed in data before and this had caused problems but restoring defaults did not cause correct dates to show up

    I found this  (TS3579: If the wrong date or time is displayed in some apps on your Mac Learn about If the wrong date or time is displayed in some apps on your Mac) useful because I did not know about the effect of typing in data and that you could only drag to rearrange the data.  I had typed in data before and this had caused problems but restoring defaults did not cause correct dates to show up in Finder. 

    It sounds like there are a couple things going on here.  First check if you have a successful install of SQL Server, then we'll figure out the connection issues.
    Can you launch SQL Server Configuration Manager and check for SQL Server (MSSQLSERVER) if default instance or SQL Server (other name) if you've configured your instance as a named instance.  Once you find this, make sure the service is started. 
    If not started, try to start it and see if it throws an error.  If you get an error, post the error message your hitting.  If the service starts, you can then launch SSMS and try to connect.  If you have a default instance, you can use the machine
    name in the connection dialog.  Ex:  "COWBOYS" where Cowboys is the machine name.  However, if you named the SQL Server instance during install, you'll need to connect using the machine\instance format.  Ex:  COWBOYS\Romo (where Romo
    is the instance name you set during install).
    You can also look at the summary.txt file in the SQL Server setup error logs to see what happened on the most recent install.  Past install history is archived in the log folder if you need to dig those up to help troubleshoot, but the most
    recent one may help get to the bottom of it if there is an issue with setup detecting a prior instance that needs to be repaired.
    Thanks,
    Sam Lester (MSFT)
    http://blogs.msdn.com/b/samlester
    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click
    "Mark as Answer" and
    "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.

  • Can we create one repository from different data Source

    Hi Experts
    I have one doubt
    1. Can we create one repository in OBIEE from different source like..
    I have three Database(Oracle) and i want to create one single repository from different source.
    2. If my Database are different like(Oracle,DB2,Teradata..)
    Thanks in advance
    Regards
    Frnds

    Hi..
    Yes It's possible to create a repository from different datasources, provided there should be different DSN for each...
    If it's ORACLE, we can import objects from OCI directly.. by mentioning the TNS Name, without creating DSN
    Thanks & Regards
    Kishore Guggilla

Maybe you are looking for

  • How can i make my hyperlinks open in a new window or tab?

    how can i make my hyperlinks open in a new window or tab?

  • How to make duplicate of current document ?

    hi, Can anyone tell me that how to make a duplicate copy of current document? so that i can do the modification with duplicate document without changing the status of original document. thanks

  • Problem with Org Chart iView

    hi all, We are currently trying to deploy the standard iView on EP6 "Organizational Chart". However we get the following error: ERROR_ABORT Module            Tree Header            Ord.Chart Operation         ERROR_ABORT Tree1(button)     Superior le

  • [ SOLVED ] aborting makepkg help

    Hi All I'm trying to install broadcom-wl and i am getting this error when i run makepkg -s $ makepkg -s ==> Making package: broadcom-wl 5.100.82.112-2 (Sat Nov 12 21:39:39 GMT 2011) ==> Checking runtime dependencies... ==> Checking buildtime dependen

  • I can't find information on setting up sub address lists

    I have a main address book. I would like to set up some "sub address" lists for special groups, etc. I would like to get some clear instructions on how to do this. It was relatively easy to do in Explorer, but I have elected to go with firefox.