473,668 Members | 2,330 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Date Formate Problem

2 New Member
hi All,
I am Working in c# .net.. I am unable to get the date that is stored in MS-ACCESS. i have tried these many queries... but i din't get any result. it is giving 'Format and date not found in class or namespace'
if any body can help me out in this it will be greatful..


SelectCommand=" SELECT * FROM tbl_Products
WHERE tbl_Products.Pr oductStartDate <= to_date('" & Format(Date, "MM/DD/YYYY") & "','mm/dd/yyyy')"


SqlCommand.Text = "SELECT ... FROM ... WHERE ( START_DATE = '" +
myDate.ToString ("yyyy/MM/dd") + "')"
Jan 17 '07 #1
2 1005
radcaesar
759 Recognized Expert Contributor
Don't pass the date variable as string.

Try it with out ' '
:)


hi All,
I am Working in c# .net.. I am unable to get the date that is stored in MS-ACCESS. i have tried these many queries... but i din't get any result. it is giving 'Format and date not found in class or namespace'
if any body can help me out in this it will be greatful..


SelectCommand=" SELECT * FROM tbl_Products
WHERE tbl_Products.Pr oductStartDate <= to_date('" & Format(Date, "MM/DD/YYYY") & "','mm/dd/yyyy')"


SqlCommand.Text = "SELECT ... FROM ... WHERE ( START_DATE = '" +
myDate.ToString ("yyyy/MM/dd") + "')"
Jan 17 '07 #2
pchimalgi
2 New Member
Don't pass the date variable as string.

Try it with out ' '
:)
hello sir,
i tried it.. its giving 'format and Date not found in class or assembly'

do i need to add any of the directives to include the date??
Jan 17 '07 #3

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

Similar topics

4
350
by: Robert Scarborough | last post by:
I have a Table in a Typed Dataset which contains a Date field called EventDate. I've ensured that the field is defined as Date as opposed to DateTime in the Typed Dataset. When I generate an xml file from an instance of this typed dataset using the ds.WriteXml method, all the dates come out formatted as follows: <EventDate>2004-01-26T00:00:00.0000000-05:00</EventDate>
4
7618
by: Robert Scarborough | last post by:
I have a Table in a Typed Dataset which contains a Date field called EventDate. I've ensured that the field is defined as Date as opposed to DateTime in the Typed Dataset. When I generate an xml file from an instance of this typed dataset using the ds.WriteXml method, all the dates come out formatted as follows: <EventDate>2004-01-26T00:00:00.0000000-05:00</EventDate>
9
12940
by: Alok yadav | last post by:
i am using a webservice in which a method is serach. i use this method which accept a argument of date type in dd/MM/yyyy formate. i have a textbox which accept the date from the user, when i convert textbox data into Datatime formate it converted into MM/dd/yyyy formate, but i have a requirement in dd/MM/yyyy formate. please help me, i am using c#.
1
3850
by: Gurunath | last post by:
Hello All, In database i am storing value in "2007-03-22 02:00:00-05" formate And from input i am taking start date in "2007-3-25" formate and end date in "2007-5-20" formate . Now what i want is i want to fetch all the records from the table which comes between this start and end date. Can anyone help me with this. Thank you Gurunath
6
2398
by: Steve Ryan | last post by:
can anyone send me to some good examples of edit in place for data frid columns i see dot net let me assign a control in the IDE any good sources of reading on editing columns with controls and setting styles thanks
0
8459
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7398
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6206
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5677
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4202
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4373
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2784
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
2
2018
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1783
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.