Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Format date column in grid
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00020632
Message ID:
00020639
Views:
38
>>>>I have two fields in a view/grid, one date, one numeric, call it section. There are two rows for each date, but each has different section:
>>>>
>>>>date1 section1
>>>>date1 section2
>>>>date2 section1
>>>>date2 section2
>>>>
>>>>I want to show in the grid MDY if section1, and CDOW if section2. Something like:
>>>>
>>>>iif(section=1,MDY(mydate),CDOW(mydate)) to give
>>>>
>>>>01/12/97
>>>>Monday
>>>>01/13/97
>>>>Tuesday
>>>>
>>>>in column controlsource? I've seen this done, but can't seem to get it working. This column is Readonly. Any ideas?
>>>
>>>what is *give* ?
>>>same as:
>>>give=iif(section=1,MDY(mydate),CDOW(mydate))
>>>or
>>>store iif(section=1,MDY(mydate),CDOW(mydate)) to give
>>
>>Oh, sorry, that's math talk...
>>
>>to give = 'should show the results as'
>
>The iif syntax seems good in command window, and an iif(empty(field),'Y','N') in a column controlsource produces a Y/N in a test grid. The only thing I haven't done is create your exact table. Want me to try it ?

Sure, if you've got time...

I should tell you that I actually did get it working directly on a table, before I set up the view...of course I've since lost all the exact settings I had then. Sparse = .f., all textbox controls default, I believe...
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform