Re: date format by Stephen
Stephen
Fri Oct 27 06:03:57 CDT 2006
Not simple and neat but you could just write a suitable function and then
call it from the report:
ldSampledate = DATE()
? convertdate(ldSampleDate)
FUNCTION convertdate
LPARAMETERS ldDate
lcDay = PADL(LTRIM(STR(DAY(ldDate))), 2, [0])
lcMonth = SUBSTR(CMONTH(ldDate),1,3)
lcyear = LTRIM(STR(YEAR(ldDate)))
lcConvertedDate = lcday + [-] + lcMonth + [-] + lcyear
RETURN lcConvertedDate
Stephen
"Agnes" <agnes@dynamictech.com.hk> wrote in message
news:Olcx3Lb%23GHA.4376@TK2MSFTNGP03.phx.gbl...
> However, I only show it in some report.
> I can't change the client's PC setting
>
> "Fred Taylor" <ftaylor@mvps.org!REMOVE>
> ¼¶¼g©ó¶l¥ó·s»D:uMuoPmZ%23GHA.4356@TK2MSFTNGP05.phx.gbl...
>> You can change your Windows format for it's Short Date (Control Panel,
>> Regional and Language Options,Regional Options, Customize button, and
>> then Date tab). Change the Short Date format to dd-MMM-yy from the
>> ComboBox values.
>>
>> Then in VFP, SET DATE SHORT. VFP will now use your Windows format for
>> all date formating.
>> --
>> Fred
>> Microsoft Visual FoxPro MVP
>>
>>
>> "Agnes" <agnes@dynamictech.com.hk> wrote in message
>> news:e5jLJNY%23GHA.924@TK2MSFTNGP03.phx.gbl...
>>> now the date format is 23-10-2006,
>>> my client want it to be 23-Oct-2006
>>> Any simple method to do ??
>>> Thanks a lot
>>>
>>
>>
>
>