am or pm in time ?

  • Thread starter Thread starter Joe Van Meer
  • Start date Start date
J

Joe Van Meer

HI all,

In my sql query for my app how do I determine if the datetime value in the
database is am or pm?

Cheers & thanks, Joe
 
What kind of database are we talking about?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.
 
Hi again,

Sry, it is sql server 2000 and I am storing a value like : 1/2/2005 1:03:00
AM.

I did not locate the argument for the datepart function for am or pm.

Cheers, Joe :)
 
I guess what I am really getting at is how to compare 2 datetime values in
the above format to the minute.

Cheers, Joe :)
 
The DATEPART function, when used with hours, will return a number between 0
and 23.

It is important to remember that what you see is a formatted date, but what
the database sees is a number. Humans like to see things in different ways,
but in truth and in fact, there are 24 hours in a day, and the hour part of
a date will therefore always be a number between 0 and 23.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.
 
Thanks gentlemen! Totally forgot about that Kevin, thx for reminder.

Cheers, Joe :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top