Gary Milne Active Member Licensed User Longtime User Jul 27, 2014 #1 I'm just trying to get it to return an AM/PM string. Even using the default format from the ToolTip help generates a compiler error. Took me a while to find the documentation but I thought that would be easy after that. Tried a few suggestions from the documentation such as "h:mm a" "hh:mm:ss a" but nothing works. Can't find any pointers on this forum either. I know it must be a common issue as the US does not use 24 hour time much.
I'm just trying to get it to return an AM/PM string. Even using the default format from the ToolTip help generates a compiler error. Took me a while to find the documentation but I thought that would be easy after that. Tried a few suggestions from the documentation such as "h:mm a" "hh:mm:ss a" but nothing works. Can't find any pointers on this forum either. I know it must be a common issue as the US does not use 24 hour time much.
ivan.tellez Active Member Licensed User Longtime User Jul 27, 2014 #2 Thats easy, and its on the android documentation: But the main problem is your code, its all wrong, TimeFormat its a property, not a function, and even the intellisense is telling you that you have errors. So, for 24h its: Code: Copy DateTime.TimeFormat = "HH:mm:ss" And for AM/PM its: Code: Copy DateTime.TimeFormat = "KK:mm:ss a" Upvote 0
Thats easy, and its on the android documentation: But the main problem is your code, its all wrong, TimeFormat its a property, not a function, and even the intellisense is telling you that you have errors. So, for 24h its: Code: Copy DateTime.TimeFormat = "HH:mm:ss" And for AM/PM its: Code: Copy DateTime.TimeFormat = "KK:mm:ss a"
Gary Milne Active Member Licensed User Longtime User Jul 27, 2014 #3 Aaah, thank you Ivan. So used to typing the "(" to get the help I overlooked the obvious that it was not required. thanks again. Upvote 0
Aaah, thank you Ivan. So used to typing the "(" to get the help I overlooked the obvious that it was not required. thanks again.