Hi,
Although the "BuiltIn.Get Time" is partly kind of confusing keyword it
can be used to achieve what you want:
*** Keywords ***
times
${foo}= Get Time year month day
${bar}= Set Variable ${foo[2]}/${foo[1]}/${foo[0]}
You could of course make your own python/java keyword that does the same trick.
Kind Regards,
Mikko Korpela
2012/8/20 finspin <jaros...@gmail.com>:
> Is there an easy way to generate current date in the following format
> DD/MM/YYYY?
>
> To my understanding the built in Get Time keyword doesn't support this kind
> of formatting.
>
> --
> You received this message because you are subscribed to the Google Groups
> "robotframework-users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/robotframework-users/-/IPyz1EcY1YUJ.
> To post to this group, send email to robotframe...@googlegroups.com.
> To unsubscribe from this group, send email to
> robotframework-users+unsub...@googlegroups.com.
*** Settings ***
Library DateTime
*** Test Cases ***
Give Me Days
${today} = Get Current Date result_format=%Y-%m-%dShould Be Equal ${today} 2015-06-15 #result_format=%Y-%m-%d gives you, for example, 2015-06-15 ${converted} = Convert Date ${today} date_format=%Y-%m-%d result_format=%m-%d-%yShould Be Equal ${converted} 06-15-15#%m-%d-%y will give you 06-15-15 ---- note that %Y is the four-digit year and %y is the two-digit year! That matters.Ugh
Answer to that question is explained in the keyword documentation: http://robotframework.org/robotframework/latest/libraries/BuiltIn.html#Get%20Time
-Tatu
Send from my mobile
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at http://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.