Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating datetime from character fields
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01619255
Message ID:
01619280
Views:
33
>>>>>>>Works fine for me. Did you test it yoursef?
>>>>>>>
>>>>>>>set date BRITISH
>>>>>>>
>>>>>>>dater = "30/04/2015"
>>>>>>>
>>>>>>>timer = "09:57"
>>>>>>>
>>>>>>>? CTOT(dater + " " + timer)
>>>>>>>
>>>>>>>
>>>>>>>>set date to british
>>>>>>>>
>>>>>>>>dater is 30/04/2015
>>>>>>>>
>>>>>>>>timer holds 09:57
>>>>>>
>>>>>>It start to work at 10:00 - how do I get round this?
>>>>>
>>>>>Hah?
>>>>
>>>>when timer is 00:00 to 09:59 it doesn't create the datatime field
>>>
>>>I've tested all the values in a loop and everything was OK. Can you show your code and also identify the failing entries?
>>>
>>>
>>>set date BRITISH
>>>clear
>>>dater = "30/04/2015"
>>>
>>>FOR k=0 TO 10
>>>FOR i=0 TO 59
>>>	timer =  PADL(k,2,"0") + ":" + PADL(i,2, '0')
>>>	? CTOT(dater + " " + timer)
>>>endfor	
>>>endfor
>>
>>replace fstat WITH CTOT(dater+" "+timer) where fstat is a date time field
>
>
>
>Are you sure that Timer field has the leading zero?
>What are the values in Timer Field:
>[09:22] or [ 9:22]

09:22
Specialist in Advertising, Marketing, especially Direct Marketing

I run courses in Business Management and Marketing
Previous
Reply
Map
View

Click here to load this message in the networking platform