Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Special format date
Message
 
 
To
29/03/2004 01:21:19
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00890331
Message ID:
00890529
Views:
21
Marek,

Do you have to store and retrieve it in this same format or can you just do a one time conversion to a date/datetime field?

You can store it as a c(8) field and provide functions that use substr() to pull the item apart to convert back and forth between this format and a regular date column. For example:
function OpenCloseDateToDate( lcSpecialDate )

local ldConvert

do case
   case left( lcSpecialDate, 2 ) = "OP"
      ldConvert = date( int( val( right( lcSpecialData, 2 ) ) ), 1, 1 )
   case left( lcSpecialDate, 2 ) = "CL"
      ldConvert = date( int( val( right( lcSpecialData, 2 ) ) ), 12, 31 )
endcase

return ldConvert
>How is the best way to deal with this 2 special date:
>OP/01/04 - it means opening date for january of 2004
>and
>CL/12/04 - it means closing date for 2004 year.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform