I only want hour and minute in wxDateTime::Now().FormatTime Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
March.ZN
Knows some wx things
Knows some wx things
Posts: 47
Joined: Fri Sep 14, 2007 3:14 am

I only want hour and minute in wxDateTime::Now().FormatTime

Post by March.ZN » Mon Nov 26, 2007 9:06 am

How can I do?
I don't need the precision to seconds.
I am Chinese.

HeReSY
Earned some good credits
Earned some good credits
Posts: 120
Joined: Fri Sep 17, 2004 8:58 pm
Location: Germany

Post by HeReSY » Mon Nov 26, 2007 9:22 am

Try the wxString functions

BeforeLast(char) or SubString(from, to)

HeReSY

Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

Post by Jorg » Mon Nov 26, 2007 9:49 am

Do not use FormatTime then. Use Format() where you can specify exactly what you want to get back from the wxDateTime class

http://www.wxwidgets.org/manuals/2.8.0/ ... timeformat

- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb

March.ZN
Knows some wx things
Knows some wx things
Posts: 47
Joined: Fri Sep 14, 2007 3:14 am

Post by March.ZN » Mon Nov 26, 2007 10:24 am

for example?
like now is 3:40,
I should write... ?
I am Chinese.

March.ZN
Knows some wx things
Knows some wx things
Posts: 47
Joined: Fri Sep 14, 2007 3:14 am

Post by March.ZN » Mon Nov 26, 2007 10:50 am

I have known it .
Thank you.
I am Chinese.

Post Reply