Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to store time (not date) in SQL and query from VFP
Message
From
03/03/2009 14:48:05
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01297626
Message ID:
01385303
Views:
48
>>>How do you create time and date only portion of the dates? (SQL Server 2005)
>>>
>>>Thanks in advance.
>>
>>Not sure what you are asking... For cases where I only want to store and track the time and not a date, I use a datetime in sqlserver (has to be compatible with SQL 2000) field and store every date as 01/01/1901 so I can query and sort on the time.
>
>How can you store only time portion of the datetime in the character field?

I don't do that. I use sqlserver as the backend and as I mentioned, I store it as a datetime with the date portion always being 01/01/1901 and I use the time portion to store the time. There is no character field.
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform