Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DTOS
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: DTOS
Divers
Thread ID:
00528987
Message ID:
00530448
Vues:
26
>>Is there a function that does the opposite of this and converts a string, such as "20010601", to a date (CTOD() does not work unless there's a "/" in there)?
>
lcDate = "20010601"
>ldDate = EVAL("{^" + (TRANSFORM(lcDate, "@R 9999/99/99")) + "}")
Thanks, Sergey. I just created this function:
********************************************************************
*  Description.......: DateToStr - creates a date string from date
*  Calling Samples...:
*  Parameter List....: tdDate
*  Created by........: Nadya Nosonovsky 07/13/2001 02:52:32 PM
*  Modified by.......:
********************************************************************
lparameter tdDate
local lcReturn
if empty(m.tdDate)
	lcReturn='{}'
else
	lcReturn="{^" + (transform(dtos(m.tdDate), "@R 9999/99/99")) + "}"
endif
return m.lcReturn
in order to use it in SQL
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform