{"id":194,"date":"2007-05-12T16:53:41","date_gmt":"2007-05-12T14:53:41","guid":{"rendered":" http:\/\/www.nsonic.de\/blog\/2007\/05\/datetime-tdatetimepicker-without-seconds\/"},"modified":"2007-05-12T16:53:43","modified_gmt":"2007-05-12T14:53:43","slug":"datetime-tdatetimepicker-without-seconds","status":"publish","type":"post","link":"https:\/\/www.nsonic.de\/blog\/2007\/05\/datetime-tdatetimepicker-without-seconds\/","title":{"rendered":"DateTime: TDateTimePicker without seconds"},"content":{"rendered":"<p><em>> I am using the TDateTimePicker with Kind = dtkTime.  I cannot seem to get<br \/>\n> rid of the seconds in the control.  I just want my user to be able to set<br \/>\n> the hour &#038; minutes.  I have tried changing the longtimeformat to no avail.<br \/>\n><br \/>\n> Any suggestions?<br \/>\n<\/em><br \/>\nTry this (and please excuse any sloppy delphi code&#8230; C++ is my mother<br \/>\ntongue):<\/p>\n<p>DateTimePicker1.Perform(DTM_SETFORMAT, 0, LPARAM(PChar(&#8216;hh:mm&#8217; )));<\/p>\n<p>You can customize the control&#8217;s formatting by sending it the DTM_SETFORMAT<br \/>\nmessage with a formatting string as the LPARAM. Here&#8217;s a link to microsoft<br \/>\ndocumentation on the formatting string:<br \/>\nhttp:\/\/msdn.microsoft.com\/library\/psdk\/shellcc\/commctls\/DateTime\/DateTime.htm#dtp_format_chars<\/p>\n<p>[tags]Delphi, Misc, DateTime[\/tags]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>> I am using the TDateTimePicker with Kind = dtkTime. I cannot seem to get > rid of the seconds in the control.&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[11],"tags":[114,75,107],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p71Tml-38","_links":{"self":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/posts\/194"}],"collection":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/comments?post=194"}],"version-history":[{"count":0,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/posts\/194\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/media?parent=194"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/categories?post=194"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/tags?post=194"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}