473,396 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Help On date Format

rajiv07
141 100+
I have table feedback which has three cloumn

Numer(Primary),----update_date, ---------------------- comments
12345 --------------- 2007-01-01,2007-01-02 ------ com1,com2

23455 ----------------- 2007-01-01,2007-01-03 ----- com1,com


Here i have store update_date values as string.so What my problem is if i want to list a set of records between two dates How do i display in case of date are in string Format.Is it Possible.

Is Any idea Please.

Thanks In Advance.

Regards
RajivGandhi
Jan 21 '08 #1
6 1173
mwasif
802 Expert 512MB
You can use STR_TO_DATE(). You have 2 date values in the date column, first you have to seperate them and then apply this function.

BTW, why you have stored it in string format?
Jan 21 '08 #2
rajiv07
141 100+
You can use STR_TO_DATE(). You have 2 date values in the date column, first you have to seperate them and then apply this function.

BTW, why you have stored it in string format?
Thank You,and Sorry for the Late reply

Actually i am developing a Customer Feedback System .Here i am storing
the Customer's Comments using their Phone Number.The Phone Number should be unique but the comments and commented Date for that Particular Number might be More than one,so i want to store the comment date(Here i am using date As a String) and Comments,so i have store these value in database separated by comma.But When I want to list out all record using updated date
range the problem will occur.

Thanks
Regards
Rajivgandhi
Jan 22 '08 #3
mwasif
802 Expert 512MB
If you are expecting more than one comments for a number then this is not a prefered way to store. You should save a seperate record for each comment. In this way you manipulation will be a lot easier. Ofcourse then you can't keep the number as primary key.

Are there only 3 columns in the feedback table?
Jan 22 '08 #4
rajiv07
141 100+
If you are expecting more than one comments for a number then this is not a prefered way to store. You should save a seperate record for each comment. In this way you manipulation will be a lot easier. Ofcourse then you can't keep the number as primary key.

Are there only 3 columns in the feedback table?
Thanks mwasif

There is some more fields in the feedback table.The Table fields Are
feedback Table
---------------------

1.Number(Primary Key).
2.customer_Name.
3.header_msg
4.location.
4.reference
5.storeid.
6.update_date(Here i am using date as a string).
7.comments.


The fields update_date and comments might getting update more than one times.But remaining fields are same.

Can i create new table to store the update_date and corresponding comments using Number.Is it a better way than that. please Let Me know.

Thank U

Regards
Rajivgandhi
Jan 23 '08 #5
mwasif
802 Expert 512MB
Can i create new table to store the update_date and corresponding comments using Number.Is it a better way than that. please Let Me know.
Good thinking Rajivgandhi. Yes, you should create a new table containing the following fields

Number (as a foreign key)
update_date (date time column)
comments (to save comments)

Now for each comment, you have to insert a new record which will link the feedback table with Number field. And use JOIN to get the records from this table.

Let me know if you need more help.
Jan 23 '08 #6
rajiv07
141 100+
Good thinking Rajivgandhi. Yes, you should create a new table containing the following fields

Number (as a foreign key)
update_date (date time column)
comments (to save comments)

Now for each comment, you have to insert a new record which will link the feedback table with Number field. And use JOIN to get the records from this table.

Let me know if you need more help.
Thanks mwasif,

I going to do that way which you have suggested me.i will ask if i have any doubt on that.

Thank You

RajivGandhi
Jan 24 '08 #7

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

Similar topics

2
by: cg_news | last post by:
In short, what I am trying to do is, based on a date, calculate the week of year (as described in ISO 8601), then calculate the first and last date in this week period and return them in the format...
2
by: nadmasl | last post by:
I have an MS Access form, where a user enters the date by selecting it from three combo boxes for day, month and year. I convert it to 11-Jan-2004 format and attempt to write to the table with an...
3
by: Alicia | last post by:
Hi, I am trying to match two queries and make it into one query. I have only been about to group similar attributes but nothing that looks like the FinalQuery below. If anyone knows of a query...
5
by: Alicia | last post by:
Hello everyone based on the data, I created a union query which produces this. SELECT ,,, 0 As ClosedCount FROM UNION SELECT ,, 0 AS OpenedCount, FROM ORDER BY , ;
6
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing...
2
by: Bill | last post by:
I have a 200 record database that includes a date/time field, AnnivDate, for a wedding anniversary. AnnivDate has nulls and some incorrect year data. I have been creating the Access database...
9
by: pic078 via AccessMonster.com | last post by:
I need serious help - I have a frontend/backend Access database (2 MDE Files) that remains stuck in task manager after exiting the application - you can't reopen database after exiting as a result...
8
by: saladinator | last post by:
I have created an Excel spreadsheet that has a lot of data. What I want to do is import the spreedsheet to Access and create a form so that I can print each row per page in a proffessional manner....
2
matrekz42
by: matrekz42 | last post by:
Hello friends, I'm trying to run this Dynamic SQL in VB, but I keep getting "Compile Error" Syntax Error, in the "Bolded" area. I'm only trying to change these fields for the second query listed,...
5
by: jrod11 | last post by:
hi, I found a jquery html table sorting code i have implemented. I am trying to figure out how to edit how many colums there are, but every time i remove code that I think controls how many colums...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
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,...

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.