>>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 know what the specific problem is, but there's no reason to build a datetime that way. Use the DATETIME() function and then, you're not dependent on the date format or anything else.
>
>
>tDateTime = DATETIME(nYear, nMonth, nDay, nHour, nMinute, nSecond)
>
>
>I'll leave it to you to figure out how to get those values from what you have in hand.
>
>Tamar
I have tried the fields in the expression as characters and then as numeric ant it fails both times - should they be character or numeric?
Specialist in Advertising, Marketing, especially Direct Marketing
I run courses in Business Management and Marketing