Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Add time to date to make DateTime
Message
From
02/02/2017 18:51:34
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01647380
Message ID:
01647385
Views:
79
This message has been marked as the solution to the initial question of the thread.
>>Hi,
>>
>>Say I have a variable that contains a date. I want to add to it the current time and make the value DateTime type.
>>How do you do it? TIA
>
>This is what I tried:
>
>
>? CTOT( DTOC(DATE()) + TIME())
>
>the above works.
>But if I use a variable, in the following:
>
>dDate = DATE()
>? CTOT( DTOC(dDate) + TIME())
>
>
>The returned value is empty string. I don't understand why.

You missed a space:
?CTOT( DTOC(dDate) +' '+ TIME())

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform