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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A better datetime function

Status
Not open for further replies.

LCannon

IS-IT--Management
Oct 15, 2001
85
US
There has to be a better way of doing this.

m.listdate is the date & time from a SQL table's datetime field. And I currently can't get the milliseconds down, or don't know how :-(

m.listdate=STRTRAN(LEFT(cmonth(listdate),3)+" "+PADL(DAY(listdate),2,"0")+" "+ALLTRIM(STR(YEAR(listdate)))+" "+LEFT(RIGHT(TTOC(listdate),11),8)+":000",',','')

Can anyone help me clean this up? Need it to look like this: Aug 12 2002 19:58:23:376
 
I don't believe there is a way to handle millseconds in fox Attitude is Everything
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top