cancel
Showing results for 
Search instead for 
Did you mean: 

What is wrong with this syntax?

former_member217675
Participant
0 Kudos

I'm creating a detail object to convert a string to date/time.

= FormatDate ( [Recon Performed Date & Time] ; "MM/dd/yyyy hh:mm:ss AM ")

The value of [Recon Performed Date & Time] = 10/02/2016 11:52:41 AM but the variable show up like:

10/02/2016 11:52:41 AM10

I've looked for different mask settings but all of the variations fail.

How can I eliminate the "10" after the AM?

Thank you in advance for your time and help!

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member217675
Participant
0 Kudos

Thank you Mahboob! I believe I attempted that. I will however rule that out.

mhmohammed
Active Contributor
0 Kudos

Hi Scott,

Simple, to get AM/PM you need to specify "a" instead of "AM". The M in bold in the below formula is assuming that you want to show Monthnumber, as M is used for formatting Month Number. Make sense?

Wrong formula = FormatDate ( [Recon Performed Date & Time] ; "MM/dd/yyyy hh:mm:ss AM")

Correct formula: = FormatDate ( [Recon Performed Date & Time] ; "MM/dd/yyyy hh:mm:ss a")

Checkout this blog:

https://blogs.sap.com/2013/11/21/how-to-use-formulae-to-change-date-and-time-formats-in-webintellige...

Also, you might want to use SBOP Web/Desktop Intelligence (client/server) as the Primary tag to tag this question under Webi Intelligence.

Thanks,

Mahboob Mohammed