|
| |
|
|
box
Posts: 117 Joined: 12/10/2002 Status: offline
|
Retrieve data by moth or day or year - 1/30/2008 2:27:51
mydate is my field "Text" that keep the date with the following format mm/dd/yyyy. How can I retrieve data by moth or day or year only? Or should I create a separate field for day, month and year? I’m using DWR, any idea please? fp_sQry="SELECT * FROM ptinfo WHERE (mydate = #::mydate::#)"
|
|
|
|
matthewm
Posts: 4 Joined: 1/30/2008 Status: offline
|
RE: Retrieve data by moth or day or year - 1/30/2008 2:45:03
Does the field need to be of type text? What SQL DB are you using? If it is MS SQL, you could use the datetime field and refer to http://www.simple-talk.com/sql/learn-sql-server/robyn-pages-sql-server-datetime-workbench/ for how to manipulate dates (great resource). If the DB is something like MySQL then you could always look at using EPOCH time which is very easy to manipulate, Google would be able to assist in finding a resource on converting EPOCH to human readable and building quries etc. If im off track let me know and I will do what I can to assist. Thanks, matt
|
|
|
|
box
Posts: 117 Joined: 12/10/2002 Status: offline
|
RE: Retrieve data by moth or day or year - 1/30/2008 17:24:37
Thanks 4 reply, I use access MS,
|
|
|
|
matthewm
Posts: 4 Joined: 1/30/2008 Status: offline
|
RE: Retrieve data by moth or day or year - 1/30/2008 19:55:35
I havent used MS Access for a while and dont have Access on my work PC, so I hope this is correct and isnt leading you up the garden path. I found this KB article on the MS site which looks helpfull: http://support.microsoft.com/kb/210276 There is also this forum post (see down the bottom): http://www.experts-exchange.com/Database/Miscellaneous/Q_21242218.html Hopefully these two sites assist in what you are after. Good luck! Matt
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|