Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date format in Excel automation
Message
From
21/11/2005 20:57:22
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01070473
Message ID:
01071017
Views:
25
>>>In Excel automation, how to display date fields in DD/MM/YYYY format. At present it
>>>is displayed as MM/DD/YYYY format. thnaks in advance.
>>
>>You can ask Excel:
>>
>>Start recording a macro, and give the command - in this case, change the date format. Then, stop recording the macro.
>>
>>Now, look at the macro; you will see code similar to:
>>
>>
>>Selection.NumberFormat = "dd-mm-yyyy;@"
>>
>>
>>Now apply this to a cell, column, or range, for example:
>>
>>
>>loSheet.Cells(5,4).NumberFormat = "dd-mm-yyyy;@"
>>
>>
>>(Does somebody know what the "@" at the end means?)
>
>"@" usually means the cell is viewed as text, not as a number or whatever.

I tried to concatenate the results with some other text, but I get no difference, whether the format includes ";@" at the end or not. (In both cases, the date was treated as a serial number.)
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform