473,385 Members | 1,796 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,385 software developers and data experts.

how to pick date from datetime format

hi,


how to take only date from 2011-08-24 16:12 this timestamp.
Aug 29 '11 #1
2 2120
Using strtotime and date functions,
Expand|Select|Wrap|Line Numbers
  1. $d = "2011-08-24 16:12";
  2. $dat = date("Y-m-d", strtotime($d));
Aug 29 '11 #2
thanks for reply but my date is coming with html tags also so it is not taking.....i have taken substr and explode it and i now getting only the date....

ok problem solved.....
Aug 30 '11 #3

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

Similar topics

1
by: seash | last post by:
H when i execute this query, my query is crashing throwing an exception "cant convert char datatype to datetime type format my query is "insert into mytable(mydate) values ('"+ varmydate+ "')...
1
by: mimi | last post by:
my database has separate field for date and time so we can capture employees' time in and out . In Sql, date can be present in smalldatetime format, which contains only time hh:mm:ss AM/PM. How...
2
by: Harikumar G | last post by:
Friends, My hardware sends me a date format like this 15:10:20.99 UTC Mon Oct 18 2004 I need to process this format and parse to a valid SQL datetime format, how can I do it more easily? My...
5
by: Ishaan | last post by:
Hi, Is there any way to pick the data format from operating system settings using C#? I am doing an ASP.Net Application. -- Software engineer Petroleum Development Oman
10
by: okaminer | last post by:
Hi I have a program which need to get the date in the format of dd/MM/yyyy (example 24/7/2005) but when I use DateTime.Now().ToShortDatetime() the date come back as MM/dd/yyyy (example...
1
by: Ugur Ekinci | last post by:
Hi , I have two Sql Server 2000 on seperate machines , First one accepts datetime format like ("dd.MM.yyyy hh:mm:ss") And Second one accepts datetime format like ("MM.dd.yyyy hh:mm:ss") 1-...
2
by: bhv | last post by:
hello everybody, i have datetime format in mysql database table. now, in mysql date is YYYY-MM-DD format. how can i insert date in this format with VB Script ? i had tried following dim dt, dy,...
9
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...
4
by: Curious | last post by:
Hi, I have a column in a grid defined as DateTime type. Currently, it's displayed in the format of "5/23/2007", for an example. It seems that it's using the default "short date" format. I...
2
by: Seth Williams | last post by:
I need to fill a textbox with a date that, based on the current day, is 2 months back - PLUS I need it to reflect the first day of the month so - I've got : Dim dNow As DateTime =...
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.