Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Add time to date to make DateTime
Message
De
02/02/2017 19:00:43
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01647380
Message ID:
01647387
Vues:
39
*can replace date() with any valid date
local xyear,xmonth,xday,xhour,xmin,xsec
xyear=year(date())
xmonth=month(date())
xday=day(date())
xhour=int(val(substr(time(),1,2)))
xmin=int(val(substr(time(),3,2)))
xsec=int(val(substr(time(),7,2)))

local xdateTime
xdateTime= DATETIME(xyear,xmonth,xday,xhour,xmin,xsec )

messagebox(ttoc(xdateTime)+" type="+vartype(xdateTime))


*Returns the current date and time as a DateTime value, or creates a year 2000-compliant DateTime value.
*DATETIME([nYear, nMonth, nDay [, nHours [, nMinutes [, nSeconds]]]])

*Note
CTOT() can create ambiguous DateTime values and generates a compilation error when SET STRICTDATE is set to 2. To create nonambiguous Date values, use the DATETIME( ) function instead.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform