Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Cetin Basoz
  Where is Cetin Basoz?
 Izmir
 Turkey
 Cetin Basoz
 To: Alex Nocete
  Where is Alex Nocete?
 
 Philippines
 Alex Nocete
 Tags
Subject: RE: split datetime()
Thread ID: 310808 Message ID: 310847 # Views: 56 # Ratings: 2
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Sunday, June 26, 2011 1:09:37 AM         
   


> hello all,
> I need help, i have a table with this format
> |idno|datetime |
> |001 |06/25/2011 13:23:00|
> |002 |06/25/2011 14:24:00|
> |003 |06/25/2011 15:25:00|
>
> i would like to separate it like this
> |idno|date |time |
> |001 |06/25/2011 |13:23:00|
> |002 |06/25/2011 |14:24:00|
> |003 |06/25/2011 |15:25:00|
>
> Please help me with the codes.
>
> Thanks,
>
>
> Alex Nocete

set hours to 24
set seconds on
select *, ttod(datetime) as "date", ttoc(datetime,2) as "time" from myTable

Cetin Basoz

.Net has got better.Think about moving - check my blog:
My Blog
Blog (mirror) - sounds to be down

ENTIRE THREAD

split datetime() Posted by Alex Nocete @ 6/25/2011 9:26:11 AM
RE: split datetime() Posted by Samir H. @ 6/25/2011 9:40:31 AM
RE: split datetime() Posted by Mike Yearwood @ 6/25/2011 6:50:44 PM
RE: split datetime() Posted by Alex Nocete @ 6/26/2011 11:00:39 AM
RE: split datetime() Posted by Anders Altberg @ 6/26/2011 12:08:17 PM
RE: split datetime() Posted by Cetin Basoz @ 6/26/2011 1:09:37 AM