How to get Date time format using test complete
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to get Date time format using test complete
Hi All
I need to get the date time format of the date present in AUT which is localized based on the language settings of systemLocale/Browser Language settings
is there any way that i can get the DateTime format using test complete
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I would take advantage of the AQDateTime Object, there should be plenty of methods to help out.
https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqdatetime/methods.html
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
> get the DateTime format using test complete
Consider aqEnvironment.GetLocaleInfo()
/Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks everyone!
@Raviavi were you able to solve this? Please do let us know
Sonya Mihaljova
Community and Education Specialist
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @AlexKaras and @mattb , I've the same need of this post, and I'm trying your solution through the aqEnvironment.GetLocaleInfo method, but I'm not finding the way to get the time format of the browser, currently it is only returned the format of the operating system datetime (my UI adapts the datetime basing on the browsers language configuration). Can you help me to understand which parameters can I use within this method to get the time format of the browser?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I think that you need to talk to your developers. My guess is that they used some internal logic and custom formatting which operating system is not aware of.
/Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks @AlexKaras !
I've asked to the developer, to format the date on the basis of the browser locale, he uses the following javascript function:
