Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

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 the first digit of ...

Go Back   Geeks Talk > Software Testing > QTP
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read
  #1 (permalink)  
Old 01-09-2007
Expert Member
 
Join Date: Oct 2006
Posts: 689
Thanks: 0
Thanked 53 Times in 44 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 11 Times in 10 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are Off


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 04:40 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved