<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[My Visual Database — Help: Get the Current month as Digit MM for TextBox ?]]></title>
		<link>https://myvisualdatabase.com/forum/viewtopic.php?id=8834</link>
		<atom:link href="https://myvisualdatabase.com/forum/extern.php?action=feed&amp;tid=8834&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Help: Get the Current month as Digit MM for TextBox ?.]]></description>
		<lastBuildDate>Sun, 14 Jan 2024 21:13:32 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Help: Get the Current month as Digit MM for TextBox ?]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=50125#p50125</link>
			<description><![CDATA[<div class="codebox"><pre><code> if length(month) = 2 then Form1.Edit1.Text  := (IntToStr(Month)) else form1.edit1.text := &#039;0&#039; + (inttostr(month));</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (derek)]]></author>
			<pubDate>Sun, 14 Jan 2024 21:13:32 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=50125#p50125</guid>
		</item>
		<item>
			<title><![CDATA[Re: Help: Get the Current month as Digit MM for TextBox ?]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=50124#p50124</link>
			<description><![CDATA[<p>Thanks derek</p><p>This is a 1st time your solution not fix my problem but you give me a good idea, please check the attached project and let me know if their is any suggestion, just I work for make the month 2 digit on single number like 1 to 01</p><div class="codebox"><pre><code>procedure Form1_OnShow (Sender: TObject; Action: string);
var
Day, Year, Month: Word;
begin

DecodeDate(Form1.DateTimePicker1.DateTime, Year, Month, Day);
Form1.Edit1.Text := (IntToStr(Month));

end;

begin
end.   </code></pre></div>]]></description>
			<author><![CDATA[null@example.com (FMR)]]></author>
			<pubDate>Sun, 14 Jan 2024 19:37:22 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=50124#p50124</guid>
		</item>
		<item>
			<title><![CDATA[Re: Help: Get the Current month as Digit MM for TextBox ?]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=50122#p50122</link>
			<description><![CDATA[<p>Hi FMR,<br />You can&#039;t just do it as you have tried (Form1.DateTimePicker1.Format := &#039;MM&#039;) <br />This is just an edit mask that is placed on top of the datetimepicker field and doesn&#039;t change the underlying data.<br />So you need to convert your datetimepicker field to a string and then substring the part that you want (month).<br />Be aware that the attached example works for a dd/mm/yyyy date format so you might need to amend the code if the date is formatted differently in your country.<br />Regards,<br />Derek.</p>]]></description>
			<author><![CDATA[null@example.com (derek)]]></author>
			<pubDate>Sun, 14 Jan 2024 16:44:49 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=50122#p50122</guid>
		</item>
		<item>
			<title><![CDATA[Help: Get the Current month as Digit MM for TextBox ?]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=50120#p50120</link>
			<description><![CDATA[<p>Hello MVDs</p><p>I need load my TextBox with the Current month with only 2 Digit like (01) for January, Please help</p><p>I try using the Date Time Picker by this code and then copy it to the TextBox but the TextBox show to the full date and I need only the month</p><div class="codebox"><pre><code>procedure Form1_OnShow (Sender: TObject; Action: string);
begin
Form1.DateTimePicker1.Format := &#039;MM&#039;;
Form1.Edit1.Text := DateToStr (Form1.DateTimePicker1.Date); 
end;</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (FMR)]]></author>
			<pubDate>Sun, 14 Jan 2024 16:11:03 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=50120#p50120</guid>
		</item>
	</channel>
</rss>
