Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Date Format to yyyy-mm-dd
Message
De
02/05/2007 11:30:00
 
 
À
02/05/2007 11:17:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01221828
Message ID:
01221839
Vues:
9
>my forms's date format is dd-mm-yyyy (set date italian dmy)
>Now, I want to show it in report as yyyy-mm-dd (in string format )
>How can I save the date format form dd-mm-yyyy into string format (yyyy-mm-dd)

Agnes,

Edward's suggestion is one way, another way is :
  PARAMETERS  pddate
  LOCAL lcReturn
  lcReturn = ""
  lcReturn = ALLTRIM(STR(YEAR(pddate))) + "-" ;
    + PADL(MONTH(pddate),2, "0") + "-"  ;
    + PADL(DAY(pddate),2,"0")
  ENDIF
  RETURN lcReturn
not tested, just changed from my code. Mine said no dashes in format YYYYMMDD.

HTH
Beth
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform