Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bug in VFP Compiler?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00033815
Message ID:
00034004
Vues:
36
>I have spent three >month building an app for scheduling TV-programs and contracts. Now when I started compiling to distribute the app in the company it's made for it just won't work. I am working in Sweden wich makes me want to use dateformat ANSI or YMD or even better short wich is picked from the system. I am also using DATETIME() to calculate durations and seek for collisions in the schedual. To make neet input screens I have choosen to split the vital fields for date and time into four fields, s_date (date) for start date, start (char 4)for start time, e_date (date) for end date and end (char 4) for end time. To calculate duration i concatenate date and time to a datetime variable whith CTOT(DTOC(s_date)+" "+SUBSTR(start,1,2)+":"+SUBSTR(start,3,2)), and the same for end time. This works fine in the developing environment. All my functions work out just fine. At compilationtime everything goes bananas and I loose the century at input in all my datecontrols and even worse, when I
>extract the timeportion from a datetimevariable, it picks the wrong positions according to the fact that it is no longer a 24-hour format, but 12-hour.
>Have someone bumped into problems like this? What to do?
>Per Strid

Per,

You need to code your functions that manipulate those values so that they are independent on the date and times settings on teh machine. Something like this in those functions will fix your problems;

PROCEDURE Template
LOCAL lcDateSet, lcHoursSet
lcDateSet = SET("DATE")
lcHoursSet = SET("Hours")

SET DATE TO
SET HOURS TO

... Do your thing
... Then

SET DATE TO &lcDateSet
SET HOURS TO &lcHoursSet

RETURN
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform