Geeks Talk

Prepare for your Next Interview




First digit of date is getting truncated

This is a discussion on First digit of date is getting truncated within the QTP forums, part of the Software Testing category; HI in our application date accepts the value dd/mm/yyyy i am parameterizing in this field when i enter the date for eg 09/01/2007 into data table ...


Go Back   Geeks Talk > Software Testing > QTP

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 01-09-2007
Expert Member
 
Join Date: Oct 2006
Posts: 690
Thanks: 0
Thanked 49 Times in 41 Posts
JobHelper is on a distinguished road
First digit of date is getting truncated

HI in our application date accepts the value dd/mm/yyyy i am parameterizing in this field when i enter the date for eg 09/01/2007 into data table the first digit of the date i.e zero is getting truncated how to overcome this

NOTE : [This question was asked by ferozbm]
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 01-17-2007
Junior Member
 
Join Date: Jan 2007
Location: High Point, NC
Posts: 11
Thanks: 0
Thanked 2 Times in 2 Posts
bussysam2 is on a distinguished road
Re: First digit of date is getting truncated

If I get your question correctly, you are saying that you enter dates into the datatable and retrive it using a parameter into a field on the application you are testing.
To solve the truncating 'Zero', you may put in an IF statement to check the # of strings coming from the datatable in each of the month and day sections. If it is less than 2, then add a 'Zero' to the front.
Or, you may just use a format date function. Something like this;
Format(DTBox, "dd/mm/yyyy")
Reply With Quote
  #3 (permalink)  
Old 03-28-2007
Contributing Member
 
Join Date: Feb 2007
Location: Madras
Posts: 72
Thanks: 11
Thanked 7 Times in 7 Posts
raghav.kamal is on a distinguished road
Re: First digit of date is getting truncated

Navigate this way ,
Got to your Script folder --> Default excel sheet --> Format the date cell box as u want ( U cant do that in the global sheet) and Save it so that it wont get truncated when u r actally running the scripts
Reply With Quote
  #4 (permalink)  
Old 04-20-2007
Expert Member
 
Join Date: Apr 2007
Location: Kolkata
Posts: 151
Thanks: 3
Thanked 10 Times in 9 Posts
debleena23 is on a distinguished road
Re: First digit of date is getting truncated

Quote:
Originally Posted by JobHelper View Post
HI in our application date accepts the value dd/mm/yyyy i am parameterizing in this field when i enter the date for eg 09/01/2007 into data table the first digit of the date i.e zero is getting truncated how to overcome this

NOTE : [This question was asked by ferozbm]
Just put a " ' " (Single Quote) first and then enter the date (09/01/2007). Then it will take the date as you give (as it identifies it as String format and not date format).
This will work for both internal datasheet or external datasheet
Reply With Quote
Reply

  Geeks Talk > Software Testing > QTP


Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
3-Digit Numbers Puzzle admin Brainteasers 4 06-17-2008 05:58 AM
Date Function in Oracle Robert Oracle 4 02-16-2007 06:15 AM
release date Aam23 LoadRunner 1 01-28-2007 03:18 PM
Eight digit number Manojks Brainteasers 1 01-04-2007 07:52 AM
5 digit number.... psuresh1982 Brainteasers 2 11-29-2006 01:49 AM


All times are GMT -4. The time now is 03:16 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved