I have an older accounting app (SBT Pro) that is using VFP 5. I don't
have the source code available, but I can modify things in the report
design. Currently control text box in bound to variable txt_date which
displays in the report as mm/dd/yy (i.e. 07/24/06). I need it to show
like mm/dd/yyyy (07/24/2006). I've tried several things, no success.
How can I do this
Thanks,
Shreko

Date formatting in a report
Tzu-Yie
Shreko
Shean
As I understand you are working on a text field not a date field.
No matter what you use to get full century, it won't change the value of the text field!
Option 1. You should convert your field to date type and use the new one on your report.
dmyDate = ctod(text_datefield)
Option 2. In your report use this expression ctod(text_datefield)
Vedat
ideal24293
If you can use report only, use Detail Band's OnEntry method to see type of ct_date with MessageBox(Vartype(ct_date)).
In same way you could see if Set Century is On using MessageBox(Set('Century')). If type of ct_date is 'D' (or 'T') and Century is Off, set century to ON in Report's DE methods (eg: BeforeOpenTables)...
Javahar
SET CENTURY ON in the command window won;t do much for you, especially if the report is using its own private data session.
To see what DE method are, open a report. Right click on the report and select "Data Environement" from the context sensitive menu. Now Rich_click on the data environment window and select "Properties" from the context sensitive menu. Now click on the method tab of the property sheet. There are the DE methods.
Sounds like you are new to VFP. Do yourself a favor and get a copy of Fundamentals: Building Visual Studio Applications on a Visual FoxPro 6.0 Foundation at http://www.hentzenwerke.com/catalog/fund6.htm. It will certainly help to get you up to speed.
This forum will help you by answering specific questions but it will not be able to teach you the language.
Adi Kremer
Is Set Century correctly setted
You could set century in report's DE methods...
Kamil Janiszewski
Is there anything else I could do
Broken
Thanks,
Abara6
Please use that
if type('ct_date') = 'C' && check if the field type is character/text
ct_date = ctod(cdDate)
endif