Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I change month, year into date
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01411881
Message ID:
01411900
Views:
38
This message has been marked as a message which has helped to the initial question of the thread.
>i am trying to change with these codes, but month is also replacing with 01/01/01.........all year is changing correct.
>
>lcMonthList = "JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOW DEC"
>*lcMonth = "JAN"
>*lnYear = 2009
>
>SELECT registration
>GO top
>scan
>lcMonth =s_month
>lnYear = year
>newdate= DATE(lnYear, INT(AT(lcMonth, lcMonthList) / 4) + 1,1)
>replace sdate WITH newdate
>endscan
Did you try
lcMonth = upper(alltrim(s_month))
in the above code?

What exactly do you have in s_month?
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform