Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

how to retrieve in date time as dd-mm-yyyy hh:mm:ss:ss

Posted on 2007-11-20
6
Medium Priority
?
784 Views
Last Modified: 2012-05-05
Hi experts,

how do i achieve the above

thanks
0
Comment
Question by:SirReadAlot
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 2

Accepted Solution

by:
talspaugh27 earned 1000 total points
ID: 20321115
select convert(varchar(30), getdate(), 105) + ' ' + convert(varchar(30), getdate(), 108)
change the getdate to your date parameter
0
 
LVL 6

Assisted Solution

by:wshark83
wshark83 earned 1000 total points
ID: 20321117
select getdate(), convert(varchar(12), getdate(), 107), convert(varchar(10), getdate(), 108)

Results

getdate()
2007-11-20 16:51:11.460      

convert(varchar(12), getdate(), 103)
20/11/2007

convert(varchar(10), getdate(), 108)
16:51:11
0
 
LVL 2

Expert Comment

by:talspaugh27
ID: 20321161
lol both comments came in at the exact same time, looks like EE needs to break it down to the second level on the timestamps
0
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 

Author Comment

by:SirReadAlot
ID: 20321180
sorry

i forgot like this

dd-mm-yyyy hh:mm:ss:sss

sorry
0
 

Author Comment

by:SirReadAlot
ID: 20321223
ignore above post pls
0
 
LVL 2

Expert Comment

by:talspaugh27
ID: 20321930
if you are wanting the milliseconds also would be
select (convert(varchar(30), getdate(), 105) + ' ' + convert(varchar(30), getdate(), 114))
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
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
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

597 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