aqDatetime.Today()
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
aqDatetime.Today()
Hellow, I wonder about code expression.
I want to receive the today Date text using ' . '(dot) form like '2021. 8. 30.'
So I tried Set variable Value and receive the today date using aqDateTime.Today() code expression.
but that method use ' - ' form. (2021-08-30)
how can i change ' - ' to ' . ' ?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This will work for you
https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqstring/replace.html
Marsha_R
[Community Hero]
____
[Community Heroes] 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 Heroes]
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 Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you. .....
But I don't know how I use 'aqDateTime.Today' with 'aqString.Replace'.
1. I wanna input text 'today's date(year, month, day)
2. so I used aqDateTime.Today() code expression
3. So i got '2021-08-31' text
4. But What I need form is '2021. 8. 31' form.
5. So I must use the 'aqString.Replace()'
6. But I don't know how I arrage or use this code expression...
Please give me solutions............
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Marsha_R
[Community Hero]
____
[Community Heroes] 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 Heroes]
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 Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you! I finally did it change '-' to '.'
So i got '2021.09.01' form.
But Finally What I wanna do is.. '2021. 9. 1.' form..
So at last result, I need to change '0' to 'blank'.
is this possible ..?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try it and see! That's the best way. If it doesn't turn out the way that you want it, then show us what you did and tell us how the result was different from what you wanted.
Marsha_R
[Community Hero]
____
[Community Heroes] 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 Heroes]
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 Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I need 2021. 9. 9. today form.
So I tried many times.
First, I replaced "-" to "."
Second, I removed "0".
So Finally got 221. 9. 9. Form.
But I need 2021. 9. 9. form...
How can I solve this...?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
and replace it with . and a space
That will keep it from seeing the 0 in the year
Marsha_R
[Community Hero]
____
[Community Heroes] 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 Heroes]
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 Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Consider the aqConvert.DateTimeToFormatStr() method (https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqconvert/datetimetoformat...).
(I think that something like aqConvert.DateTimeToFormatStr(aqDateTime.Today(), "%Y.%#m.%#d") should work for you.)
/Alex [Community Hero]
____
[Community Heroes] 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 Heroes]
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 Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
