Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Daniel Hofford
  Where is Daniel Hofford?
 Ocala
 Florida - United States
 Daniel Hofford
 To: Andy Kramek
  Where is Andy Kramek?
 Hot Springs Village
 Arkansas - United States
 Andy Kramek
 Tags
Subject: RE: DATETIME()
Thread ID: 189004 Message ID: 189020 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: General VFP Topics
Date: Wednesday, August 13, 2008 12:58:18 AM         
   


> > Is there a function to pull the time from DATETIME()?
> > If the datetime() is 12/05/07 03:01:02 PM I need 15:01:02
> > or if its 10:15:03 AM I need 10:15:03. With a lot of parsing I can do it - just wondering if someone has written a function for it as I'm being a bit lazy here.
> >
> > Thanks
> >
> > Dan
> > "Our gold does not chink and glitter. It gleams in the sun and neighs in the dark." Chief Joseph
>
> Yes the native VFP fucntion TTOC returns just the Time portion when used with the "2" parameter:
>
>
lcTime = TTOC( DateTime(), 2 )
> ? lcTime

>
> Regards
> Andy Kramek
> Microsoft MVP (Visual FoxPro)
> Tightline Computers Inc, Akron Ohio, USA

Arrrrgh! Well I rolled one as an object cause if its pm I have to add 12 hours anyway but its good to know.
Thanks

Dan
"Our gold does not chink and glitter. It gleams in the sun and neighs in the dark." Chief Joseph

ENTIRE THREAD

DATETIME() Posted by Daniel Hofford @ 8/12/2008 10:57:18 PM
RE: DATETIME() Posted by Andy Kramek @ 8/12/2008 11:00:46 PM
RE: DATETIME() Posted by Daniel Hofford @ 8/13/2008 12:58:18 AM
RE: DATETIME() Posted by Andy Kramek @ 8/13/2008 11:54:50 AM
RE: DATETIME() Posted by Jun Tangunan @ 8/13/2008 12:28:31 AM
RE: DATETIME() Posted by Daniel Hofford @ 8/13/2008 12:58:53 AM
RE: DATETIME() Posted by Jun Tangunan @ 8/13/2008 2:49:26 AM
RE: DATETIME() Posted by Cetin Basoz @ 8/13/2008 12:23:39 PM
RE: DATETIME() Posted by Yousfi Benameur @ 8/13/2008 12:59:24 PM