> I have a field 'F_MONTH' with datatype string.
> Now i want to get the value from F_MONTH, and display it on
> DateTimePicker1 component.
>
> For example: 03 will display March, 02 will display February.
> I know 29th of Februrary isn't a valid date, and i don't even have this
> value in my database, the value just come out by itself. Try to drop a
> DateTimePicker1 component, and set its format property to 'MMM', then on
> buttonA click event write the following code then you'll get what
> error i mean:
>
> ButtonAClick Event :
> DateTimePicker1.Date := recodemonth(Now, StrToInt(F_MONTH));
Today is the 29th of july there's where your twenty-nine comes from. better you
do not use now, but build a date with year, Your month and a 'One' and
then use a dateTimeToString - call
Var MyMonth : String;
.
.
.
DateTimeToString(MyMonth,'MMMM',EnodeDate(2005,StrToInt('02'),1));
.
.
should work (didn't try)
> See i don't have any value with '29', i only pass 02 and want it to
> return me "February".
Happy Friday 29th ;-)
Bob
------------------------ Yahoo! Groups Sponsor --------------------~-->
<font face=arial size=-1><a
href="http://us.ard.yahoo.com/SIG=12hueu0tm/M=362329.6886308.7839368.1510227/D=groups/S=1705115362:TM/Y=YAHOO/EXP=1122639960/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992
">Fair play? Video games influencing politics. Click and talk back!</a>.</font>
--------------------------------------------------------------------~->
-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/delphi-en/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/