473,563 Members | 2,683 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

About DateTime in SQL

13 New Member
Hi,
I am making a report in SQL Reporting with the following format.
Does any have any idea how can I get date in this format "Monday, March 26, 2007" and how can I get time of each tranction in Reporting.I tried Formatdatetime function but it doesn't work..Plzz help me Thanks

Monday, March 26, 2007
10am 100
10am 110
1pm 100
Total: 310
Tuesday,March 27,2007
11am 500
6 pm 500
Total: 1000
Grad Total 1310
Apr 25 '07 #1
1 1598
ANR22
2 New Member
Hi,
I am making a report in SQL Reporting with the following format.
Does any have any idea how can I get date in this format "Monday, March 26, 2007" and how can I get time of each tranction in Reporting.I tried Formatdatetime function but it doesn't work..Plzz help me Thanks

Monday, March 26, 2007
10am 100
10am 110
1pm 100
Total: 310
Tuesday,March 27,2007
11am 500
6 pm 500
Total: 1000
Grad Total 1310
-----------
For Date format you can use.....Example ,

SELECT substring(CONVE RT(CHAR(20),'Ma rch 26, 2007 05:32:08 PM',109),1,14)

For Time part.... Example
SELECT CONVERT(CHAR(15 ),'05:32:08 PM',114)
Apr 27 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
1474
by: Jan Danielsson | last post by:
Hello all, I have a list of servers which an application connects to. If the connection fails, the application should mark the server as temporarily unavailable, and should try to use the server again after x units of time. In C, I would do this: server.invalidUntil = time(NULL) + 5*60; // five minute delay
3
2375
by: Justin Shen | last post by:
i wrote following code: DateTime t1 = new DateTime( DateTime.Today.ToFileTime() ); Console.WriteLine(t1); and got a output of: 0404-5-3 16:00:00 instead of 2004-5-3 16:00:00 why could this happen?
6
16248
by: FatboyCanteen | last post by:
When I using dataset to append a null value to the datetime field. It throw a error -> can not convert db.null to system.date Can there is any standard to pass a Null value to the DateTime Field! (It is successful to pass the Null Value to other type of Field)
3
2601
by: Minh Khoa | last post by:
Please give me more information about delegate and its usage? Why do i use it and when?
7
3432
by: Adrian Parker | last post by:
'function to convert null to nothing Function CheckDate(ByVal DRow As DataRow, ByVal strCol As String) As Date If DRow.Item(strCol) Is System.DBNull.Value Then Return Nothing Else Return DRow.Item(strCol) End If End Function
3
1423
by: | last post by:
Hi all, I am new to .net so I am still unsure how to do thing, but I have discovered a class called HebrwCalendar and I am so excited that I must ask if someone can help me. First, I assume this is the real Lunar Calendar and not just some sort of customization of the Gregorian Calendar. If this is so, I would like to go a head and test it...
15
1349
by: MuZZy | last post by:
Hi, Consider this: ArrayList al = new ArrayList(); FillList(al); /// NOW TWO SCENARIOS: /// 1. for (int i = 0 ; i < al.Count ; i++)
6
1693
by: Bob | last post by:
Hi, I found this code here below (about cartitems and shoppingcart) and I have two questions about sub New(). In the first class CartItem, there is two times sub New(): Public Sub New() End Sub and
37
2162
by: Hilton | last post by:
Hi, for (int i = 0; i < list.Count; i++) has a hidden performance hit; i.e. list.Count gets evaluated each time, so we write something like: int listCount = list.Count; for (int i = 0; i < listCount; i++)
4
1283
by: =?Utf-8?B?Um95?= | last post by:
I have a DataRow dr retrieved from a database. One of the column is datetime type. How do I convert it to DateTime structure in .NET? DateTime dt = DateTime.Parse(dr.ToString()) will drop the millisecond part. I want to keep the millisecond part.
0
7659
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7882
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7634
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7945
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6244
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5208
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2079
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1194
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.