Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set Seconds Off command w/ TTOC ....STILL shows Seconds ?? 1

Status
Not open for further replies.

kev100

Programmer
Jun 20, 2006
28
US
Currently using:
TTOC(DATETIME(),2) .... (special thanks to craigsboyd)

to properly display time in 12hr format with AM/PM.

It will corectly return:
12:31:04 PM

I'm needing....
12:31 PM

Using:
SET SECONDS OFF
TTOC(DATETIME(),2)

Will still return...
12:31:04 PM

Is this the correct usage of SET TIME ON/OFF ?

Thanks
 
I'm not sure....but suspect so.

This is a network app and several agents are actively using it at once.

The execuatable for the app is launched from a shared area on the network.
 

Kev,

The fact of it being networked, or launched from a shared area, won't affect this issue.

What's more likely to affect it is your SET DATE setting. For example, on my system, I see the following:

Code:
SET seconds OFF
SET DATE AMERICAN
? TTOC(DATETIME(),2) && no seconds visible

SET DATE LONG 
? TTOC(DATETIME(),2) && seconds are visible

It might be different for you. It depends on how you've set the datetime format in Windows Control Panel.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 


SET seconds OFF
SET DATE AMERICAN

Fantastic !
That got it.

Thanks VERY much...

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top