?
Solved

getdate() default

Posted on 2005-05-12
10
Medium Priority
?
492 Views
Last Modified: 2010-03-19
i have a table w/a datetime field that has a getdate() default.  but the only thing i am getting is the 2005-05-12 00:00:00.000
what do i need to be doing to get the seconds?
0
Comment
Question by:RLLewis
  • 5
  • 3
  • 2
10 Comments
 
LVL 21

Expert Comment

by:Kevin3NF
ID: 13990576
datetime or smalldatetime?
0
 
LVL 1

Author Comment

by:RLLewis
ID: 13990597
datetime -- i've always assumed i would get my time in there, too.  everything i've read says the same.  but it's not happening.
0
 
LVL 28

Expert Comment

by:rafrancisco
ID: 13990634
Where are you getting this result?  From Enterprise Manager or Query Analyzer or some other application?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:RLLewis
ID: 13990716
2005-05-12 00:00:00.000 - from query analyzer - oh, possibly my result options?
0
 
LVL 21

Expert Comment

by:Kevin3NF
ID: 13990722
Some apps, like Access don't always pass in the time....
0
 
LVL 28

Accepted Solution

by:
rafrancisco earned 500 total points
ID: 13990732
Yes, possibly your result options.  Check under Connections, "User regional settings..."
0
 
LVL 1

Author Comment

by:RLLewis
ID: 13990918
should it be checked or  not?
i had an issue the other day where my sequencenumber colums were appearing as money (10,000,000) as opposed to reguarly identity int value (10000000) - i unchecked regional and they're good now. how is this impacting my datetime ?
0
 
LVL 1

Author Comment

by:RLLewis
ID: 13990937
i must be missing something.  i've checked regional, and my datetime is now showing my seconds - 3/22/2005 1:29:46 PM
but the sequencenumber has become this:  1,000.00
0
 
LVL 28

Expert Comment

by:rafrancisco
ID: 13991662
If you checked the Regional setting, all numeric values are shown as 1,000.00 format, regardless of the data type.  If it is unchecked, it will be displayed as 1000.

Now, the weird part that is happening to you is the missing time in the date/time when it is unchecked.  Have you tried closing your Query Analyzer and trying it again?
0
 
LVL 1

Author Comment

by:RLLewis
ID: 13995255
well, as much as I hate to say this, yes - i've closed qa, re-opened and now the time is there.  that just doesn't make any sense to me.  but...it's merely a display issue.  at least there's nothing wrong w/the actual data itself.  thx for your help rafran and kevin
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
This shares a stored procedure to retrieve permissions for a given user on the current database or across all databases on a server.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question