Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
problems with formatting text
#1
Solved: 11 Years, 5 Months ago
i have a text box i want to put the time and date in so i can keep track of the times the tests are run
Code:
SwfWindow("Form").SwfEdit("TextboxName").Set "time " & Time()

the problem is i want to format the time a certain way so i wrote this function
Code:
Function formatmyTime
Dim myTime
FormatDateTime Now(), 3
myTime = "Time = " & Month(Now()) & "." & Day(Now()) & "." & Year(Now()) & " " & Time()
myTime = Replace(myTime,":",".")
End Function
myTime should now be 7.15.2008 9.25.57 AM
now how do i make it call myTime
Code:
SwfWindow("Form").SwfEdit("TextboxName").Set "time " & Time()
the reason is that it creates so many records in the database i wanted to add the seconds to them i can search the database easier. and the reason i have to format it is because my textbox does not allow the : character
Reply


Messages In This Thread
problems with formatting text - by bis - 07-15-2008, 09:29 PM
RE: problems with formatting text - by Ankur - 07-16-2008, 12:03 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Problems with Text color recognition Treirk 0 1,149 06-17-2019, 12:19 PM
Last Post: Treirk
  Need to Validate Text filed is blank after clicking on the Text box balak89 3 4,974 09-13-2015, 12:06 AM
Last Post: ADITI1992
  I am trying to extract text from a webelement but it is generating blank text scenari excellentpawan 2 4,753 08-13-2013, 08:37 PM
Last Post: excellentpawan
  Problems with URL as Object identifier??? jcraig26 1 3,391 02-27-2013, 05:06 PM
Last Post: anil2u
  QTP recording problems Masa 2 2,466 11-11-2012, 08:28 AM
Last Post: Masa

Forum Jump:


Users browsing this thread: 1 Guest(s)