Micro Focus QTP (UFT) Forums
How to identify the sap date format. - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: How to identify the sap date format. (/Thread-How-to-identify-the-sap-date-format)



How to identify the sap date format. - kamal262007 - 10-15-2012

hi,
How to identify the SAP date format. plz reply


RE: How to identify the sap date format. - Ankesh - 10-15-2012

What do you want to identify? Can u explain a bit?

Usually SAP date fromat will be in mmddyyyy Format.


RE: How to identify the sap date format. - kamal262007 - 10-15-2012

In SAP 6 and 7 types of date’s formats.
But I'm asking for following 3 types of formatting.
DD.MM.YYYY
MM/DD/YYYY
YYYY.MM.DD

If in QTP, I maintain DD.MM.YYYY format. But in user's SAP system has different format. How can manage this situation


RE: How to identify the sap date format. - Ankesh - 10-16-2012

I would suggest you to use mmddyyyy format as it will be easier for you. You can use Date() for this.

Anyways, to get the date in your desired format, you can always create them using the below code...


Code:
daytoday=Day(Now)
currentMont=Month(Now)
currentyear=Year(Now)

Now you have the day, month and year value . you can make them as you want.

eg.
for DD.MM.YYYY use daytoday&"."&currentMont&"."&currentyear

Similar way you can make any combination.

Regards,
Ankesh


RE: How to identify the sap date format. - kamal262007 - 10-17-2012

Hi Ankesh,
Thanks for your help.

Regards,
Kamal