How to convert QlikView Time to Salesforce time in a load script?

Ok, so here is what I am doing:

  1. I am storing Salesforce data in a QVD file.
  2. I am getting the QVD file date using:
    Let QVDPath='C:\ProgramData\QlikTech\QVD';
    Let ThisExecTime = Reloadtime();
    Let LastExecTime = QvdCreateTime('$(QVDPath)\SFCase.qvd');
    
  3. I am trying to only get data modified since load using WHERE LastModifiedDate > $(LastExecTime ).

According to salesforce, the time stamp should be in this format:

1999-01-01T23:01:01Z

See this page for more detailed information and alternate formats:
http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_soql_select_dateformats.htm

So I created this sub to get Salesforce time from QlikView time:

Sub SFTime(inDateTime)
    Let inDateTime=date(inDateTime, 'YYYY-MM-DD') & 'T' & time(inDateTime, 'HH:MM:SS') & 'Z';
EndSub

It works.

2 Comments

  1. Earnest Costadimas says:

    Wow, amazing weblog format! How lengthy have you been blogging for? you make blogging glance easy. The total look of your site is wonderful, 112sx3zzawdc9 as neatly as the content! okb

  2. Michael says:

    Thanks for this. Big help.

Leave a Reply to Michael

How to post code in comments?