>My program has the following code
>
>datexo=LEFT(datx,2)+"/"+monato+"/20"+SUBSTR(datx,8,2)+" "+SUBSTR(datx,11,6)+":00"
>
>which results in a data like 28/10/2015 10:30:00 still in character format
>
>its then appended into a date time field
>
>This works fine as long as I run it from inside VFP on all machines
>
>But if I run it as a scheduled service or from Explorer on 1 machine the date time field is blank although the character format is the same 28/10/2015 10:30:00
>
>What is the problem?
I don't see anything in the code which might depend on a specific environment (such as a date format). I guess you need to use some debugging techniques - such as checking the actual value of "datx" and of "datexo" every time you run the program. To (a) avoid output on the screen and (b) avoid lots of false alarms, you might do something like convert datexo to a datetime value, check whether the result is empty, and if it is, write the values of datexo and datex to a file.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)