Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Special format date
Message
 
 
À
29/03/2004 01:21:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00890331
Message ID:
00890529
Vues:
20
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform