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

d'oh! stupid "long time" format! 1

Status
Not open for further replies.

javaguy1

Programmer
May 14, 2003
136
0
0
US
i want time displayed without the AM/PM, like this hh:mm:ss
i guess i can't have that. apparently "short time" does not use AM/PM but medium and long both do.
 
This is a function i use to convert to date/time format

Public Function CnvDteTime(vardata) As String
If IsDate(vardata) Then
CnvDteTime = "'" & Format(vardata, "dd-mmm-yyyy hh:MM:ss am/pm") & "'"
Else
CnvDteTime = "NULL"
End If
End Function

so format(date,"dd-mmm-yyyy hh:MM:ss") may give you what you need?

Transcend
[gorgeous]
 
does Format(Time,"hh:mm:ss") look legit?
i suppose i could just try it.....
 
it's MM

if you use little m's it won't work

M= minute
m = month

Format(Time,"hh:MM:ss")

Transcend
[gorgeous]
 
that did it, thanks again transcend. this would all be a lot easier if we had an API like the one Java has instead of this nightmare called MSDN.
 
can i know the Format(date,"d mmm yyyy")

the word format using wat reference? i move to another pc, then error while compiling the code

I'm Keep Studying.... please show the way...
Not Good in English
 
I'm sorry what are you asking?

You don't need any references to use the Format function.

What are you trying to do?

Transcend
[gorgeous]
 
when i compile a progra in another pc, it state error at the word format... can anybody help??


I'm Keep Studying.... please show the way...
Not Good in English
 

>if you use little m's it won't work
Then use n's.

zaq888, What is the error number?
And post the line of code with the error.
Check and see if there is a difference in the Country Settings Date format (though if done right, this shouldn't make a difference)
 
got it...

in order to move / copy foler from one computer to other computer that have the older version, i have to create a new project n add all the form n data report.. got it...
i also cannot detect the exacally problem..

anyaway, Thanks guys

I'm Keep Studying.... please show the way...
Not Good in English
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top