A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

sql time formatting



 
 
Thread Tools Display Modes
  #1  
Old July 8th, 2004, 05:18 PM
dp
external usenet poster
 
Posts: n/a
Default sql time formatting

hey guys,

trying very hard to format a time for an update query (without date part)

I have this so far:

Format$(strTime,"\#hh\:nn\:ss ampm\#")

Isnt there some vb function that can format for me?

Cheers,
David



  #2  
Old July 8th, 2004, 06:53 PM
Pat Hartman
external usenet poster
 
Posts: n/a
Default sql time formatting

Dates are not stored as strings. They are stored as
double precision so I'm not sure why you are formatting
it. Dates are always formatted when they are displayed.
If you don't specify a specific format, the windows
default date format is used.

These are approximately the same time but the second shows
how the date is actually stored:

print now()
7/8/2004 1:52:04 PM
Print cdbl(now())
38176.5777314815

-----Original Message-----
hey guys,

trying very hard to format a time for an update query

(without date part)

I have this so far:

Format$(strTime,"\#hh\:nn\:ss ampm\#")

Isnt there some vb function that can format for me?

Cheers,
David



.

  #3  
Old July 9th, 2004, 03:05 AM
Dale Fye
external usenet poster
 
Posts: n/a
Default sql time formatting

David,

Try the TimeValue() function. This returns the time in the hh:mm:ss am/pm
format

HTH
Dale

"dp" wrote in message
...
hey guys,

trying very hard to format a time for an update query (without date part)

I have this so far:

Format$(strTime,"\#hh\:nn\:ss ampm\#")

Isnt there some vb function that can format for me?

Cheers,
David





 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with Style formatting terrapinie Formatting Long Documents 2 July 7th, 2004 06:18 PM
Calendar time change Jr Calendar 4 May 1st, 2004 02:59 AM
time calculation David McRitchie Setting up and Configuration 2 March 28th, 2004 09:14 PM
Formatting cells to read time in 1/100ths John Wright Setting up and Configuration 1 March 9th, 2004 10:38 PM


All times are GMT +1. The time now is 04:48 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.