473,320 Members | 2,111 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,320 software developers and data experts.

change '2007-05-10' to current date

127 100+
$sql = select bc_id,company_login,from_unixtime(bc_time) as bc_time,bc_status,bc_total_sent_out,bc_actual_sent _out
from broadcast
where left(from_unixtime(bc_time),10)='2007-05-10'
and bc_status in (2,3)
order by bc_time asc

above is my query for a project,
where left(from_unixtime(bc_time),10)='2007-05-10'
how to change '2007-05-10' to current date in same format(yyyy-mm-dd) so i no need to change it manually everytime....

thankx...
May 11 '07 #1
2 1258
pradeep kaltari
102 Expert 100+
$sql = select bc_id,company_login,from_unixtime(bc_time) as bc_time,bc_status,bc_total_sent_out,bc_actual_sent _out
from broadcast
where left(from_unixtime(bc_time),10)='2007-05-10'
and bc_status in (2,3)
order by bc_time asc

above is my query for a project,
where left(from_unixtime(bc_time),10)='2007-05-10'
how to change '2007-05-10' to current date in same format(yyyy-mm-dd) so i no need to change it manually everytime....

thankx...
Hi,

Try this:
Expand|Select|Wrap|Line Numbers
  1. where left(from_unixtime(bc_time),10)=DATE_FORMAT(CURRENT_DATE,'%Y-%m-%d')
  2.  
I guess this is what you are looking for.

Regards,
Pradeep
May 11 '07 #2
bb nicole
127 100+
Yes, thats what i want, thanks a lot, Pradeep...... :)


Hi,

Try this:
Expand|Select|Wrap|Line Numbers
  1. where left(from_unixtime(bc_time),10)=DATE_FORMAT(CURRENT_DATE,'%Y-%m-%d')
  2.  
I guess this is what you are looking for.

Regards,
Pradeep
May 14 '07 #3

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

Similar topics

5
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I change the text in the url/location bar?...
3
by: Henrootje | last post by:
I have a lot of tables that hold a lot of numeric fields. The names of all of these tables start with ' tblRO' Now it turns out that all of the numeric fields with type double precision have the...
3
by: guillermojco | last post by:
Hi, I've got an ASP.NET page that returns XLS, DOC, PDF and other files from binary fields in a database. The problem is that MS-Excel 2007 shows a security warning when trying to open the...
13
by: shapper | last post by:
Hello, I see in many web sites, such in Google, inputs that when i click on them to write something they change their style. This works both in Firefox and IE (These are the ones with which I...
5
by: raha | last post by:
hi. Is there any body to help me? I am writing a web program. I have some forms. each form have some controls and users can edit the controls. finally they can save their forms. I would like...
3
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I change the confirm box to say yes/no or default to cancel?...
6
by: kang jia | last post by:
hi Currently i am doing a website for users to book cars online, however, when inserting the time into database is in the format of 2007-12-19 21:28:06 which is fine. when i do my application into...
4
by: TD | last post by:
I am trying to change the forecolor of a field in a subform that is in datasheet view. I am using Access 2007. I have tried everything I can think of to do this but the text still appears in...
4
by: sgxbytes | last post by:
Hi, My html has <Table style="year-button-archive" width="60%" > <tr> <td class="gold" > <a title="year">By Year:</a> <td class="gold"> <a id = "2008"...
1
by: cwoll | last post by:
I have a table with 5 different fields. ID Field Name = This field refers to land not a field in access. 2007 Crop 2008 Crop 2009 Crop I now have a query that just gives me "Field Name" and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.