SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Dec 2003
    Location
    india
    Posts
    111
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    qtp excel functions getting failed in different language

    Hi All,
    In our application there are some fields in which i need to give current date,time as an inputs to the field, hence I've used =today(),=now()function as test data in the excel sheet. And set the format of today as ddmmyyyy.
    (ie not handled in script instead used these function in excel cells itself)
    I've done that in Windows XP OS with english language but when i run the same in German OS windows machine. This today field is creating some problem. Becuase the format of the date function is getting changed.
    Is that the right way to handle these things in excel itself or do we need to do that in qtp script? If so how?
    TIA

  2. #2
    Senior Member
    Join Date
    Jul 2001
    Location
    Boston, MA
    Posts
    119
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: qtp excel functions getting failed in different language

    You could use 'Date' and 'Now' functions in QTP corresponding to '=today()' and '=now()' in Excel.

  3. #3
    Senior Member
    Join Date
    Jan 2000
    Location
    USA, CA
    Posts
    1,998
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: qtp excel functions getting failed in different language

    For DataTable control - mercury uses not MS Excel object, but Formula One AxtiveX control from:
    http://www.reportingengines.com/products/index.jsp
    They look similar at first glance, and functionalities are pritty the same.But them are totally different products.

    That's why there are a lot of incompatibilities.
    Basic functionality, that DataTable needs - work perfectly and very fast. But others - not at all.
    I had some problems in cell Formula, Macro, conversion, publishing processes.

    Janna

  4. #4
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: qtp excel functions getting failed in different language

    You should always convert the date to the desired formart from given data rather then depending upon the input format. I think FormatDateTime function of VBScript may be helpful to you.

  5. #5
    Member
    Join Date
    Dec 2003
    Location
    india
    Posts
    111
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: qtp excel functions getting failed in different language

    All,
    Thanx for your reply.
    Please let me know more on these stuff.
    Currently I've one reusable action in which I'm making use of that date format column like this.
    Here below the script in which I'm calling that datatable column.
    WebEdit("SHIPMENT_POSTAGE_VOUCHER_DATE").Set DataTable("SHIPMENT_POSTAGE_VOUCHER_DATE", dtGlobalSheet)

    Where in the excel sheet "SHIPMENT_POSTAGE_VOUCHER_DATE" I format the date column as ddmmyyyy. How can I handle this in script using formatdatetime function or today or date function?
    TIA

  6. #6
    Senior Member
    Join Date
    Jul 2001
    Location
    Boston, MA
    Posts
    119
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: qtp excel functions getting failed in different language

    'formatdatetime' will format based on your computer's regional setting. So you will see different results for different language OS. You will have to handle this by string manipulation for international testing.

    Or you could use this </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">
    mydate = month(date) &amp; &quot;/&quot; &amp; day(date) &amp; &quot;/&quot; &amp; year(date)
    WebEdit(&quot;SHIPMENT_POSTAGE_VOUCHER_DATE&quot.Set mydate</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">

    [ 02-07-2006, 06:00 AM: Message edited by: LPV ]

  7. #7
    Member
    Join Date
    Dec 2003
    Location
    india
    Posts
    111
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: qtp excel functions getting failed in different language

    hi thanks,
    It works out.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 11:50 PM.

Copyright BetaSoft Inc.