adding the date part of datetime to the time part of datetime 
Author Message
 adding the date part of datetime to the time part of datetime
How  can I do this?

For example:

Datetime1 = 09/01/2000 00:00:00
Datetime2 = 01/01/1900 15:25:00

and what I want to get out is:    Result = 09/01/2000 15:25:00

Thanks for any helps,

PAN



Tue, 25 Feb 2003 05:00:03 GMT
 adding the date part of datetime to the time part of datetime

PAN,

Sure can. There might be other methods, but I'd do it through converting to
characters:




--
Tibor Karaszi, SQL Server MVP
Please reply to the newsgroup only, not by email.
See Neil Pike's FAQ at: http://www.ntfaq.com/Articles/Index.cfm?DepartmentID=800

Quote:

> How  can I do this?

> For example:

> Datetime1 = 09/01/2000 00:00:00
> Datetime2 = 01/01/1900 15:25:00

> and what I want to get out is:    Result = 09/01/2000 15:25:00

> Thanks for any helps,

> PAN



Tue, 25 Feb 2003 15:45:49 GMT
 adding the date part of datetime to the time part of datetime

PAN,

this is my solution:


Gustav



Tue, 25 Feb 2003 16:50:15 GMT
 adding the date part of datetime to the time part of datetime

Thanks guys for your helps!

PAN


Quote:
> How  can I do this?

> For example:

> Datetime1 = 09/01/2000 00:00:00
> Datetime2 = 01/01/1900 15:25:00

> and what I want to get out is:    Result = 09/01/2000 15:25:00

> Thanks for any helps,

> PAN



Tue, 25 Feb 2003 22:35:20 GMT
 adding the date part of datetime to the time part of datetime

PAN,

Try this:





--
Ivan Arjentinski
-----------------------------------------------
Please answer only to the newsgroups.
I'll not answer any direct emails.
-----------------------------------------------


Quote:
> How  can I do this?

> For example:

> Datetime1 = 09/01/2000 00:00:00
> Datetime2 = 01/01/1900 15:25:00

> and what I want to get out is:    Result = 09/01/2000 15:25:00

> Thanks for any helps,

> PAN



Wed, 26 Feb 2003 01:46:06 GMT
 
 [ 5 post ] 

 Relevant Pages 

1. Display time part of datetime field

2. cannot create a primary to the date part of a datetime field

3. Evaluating the Date part of a datetime

4. Build datetime from date parts

5. Extract Date part from datetime

6. Date part of datetime help

7. return only date part of datetime

8. TRIGGER that cut the time part of a datetime

9. Want to compare DateTime field, but ignore the time part

10. Searching by date part only of a datetime field

11. getting formatted date part of datetime column

12. Profile of of a DBA - part System Admn / Part Network Admin / Part Web Admin


 
Powered by phpBB® Forum Software