473,511 Members | 12,017 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MySQL Date Question......help please.

Hi All,
I want to convert a date......
I am given the Day of the Week, plus the Hour and Minute. I want to
convert that into a YYYY-MM-DD HH:MI format so I can store it and sort
it in the database.
The only think I know is the beginning of the week date, and the end of

the week date.......
Can anyone help?
PS: I'm writing a script in Perl............
Thanks,
Arthur

Jan 9 '06 #1
3 1553
On 9 Jan 2006 13:32:04 -0800, am****@iwc.net wrote:
PS: I'm writing a script in Perl


Wrong newsgroup then, try comp.lang.perl.misc.

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Jan 9 '06 #2
am****@iwc.net wrote:
Hi All,
I want to convert a date......
I am given the Day of the Week, plus the Hour and Minute. I want to
convert that into a YYYY-MM-DD HH:MI format so I can store it and sort
it in the database.
The only think I know is the beginning of the week date, and the end of

the week date.......
Can anyone help?
PS: I'm writing a script in Perl............
Thanks,
Arthur


google -- perl date format
and mysql date format
will give you what you are looking for.
--
Michael Austin.
Jan 9 '06 #3
am****@iwc.net wrote:
I want to convert a date......
I am given the Day of the Week, plus the Hour and Minute. I want to
convert that into a YYYY-MM-DD HH:MI format so I can store it and sort
it in the database.
The only think I know is the beginning of the week date


Ok, that's enough :)

If the Day of the Week you're given is Monday add 0 to the beginning of
the week date; if it's Tuesday, add 1; Wednesday, add 2; ...

Adjust at will if your week doesn't start on Mondays.

--
Mail to my "From:" address is readable by all at http://www.dodgeit.com/
== ** ## !! ------------------------------------------------ !! ## ** ==
TEXT-ONLY mail to the whole "Reply-To:" address ("My Name" <my@address>)
may bypass my spam filter. If it does, I may reply from another address!
Jan 9 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
4409
by: Neil | last post by:
Hi, I hope this question isn't too far off topic....I'm almost at my wits end trying to figure this out. I have a Mysql database and I wish to automate the backup of the database because I...
5
3715
by: Dominique Javet | last post by:
Hello, I'm new to php and mysql and I use Dreamweaver MX 2004, so sorry for this "newbie" question... I've found no answer in the forum ... I've a date problem with my formular. In my mysql DB...
4
7059
by: RT | last post by:
If anyone can help that would be great. I¹m trying to format a timestamp from my MySQL table (sessions) Here¹s the code I¹m using: <?php echo date('D,n-j-y h:i:s...
0
2620
by: Girish Agarwal | last post by:
--0-474210375-1058976151=:31789 Content-Type: text/plain; charset=us-ascii Content-Id: Content-Disposition: inline Note: forwarded message attached. __________________________________
15
4564
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to...
2
2870
osward
by: osward | last post by:
Hello there, I am using phpnuke 8.0 to build my website, knowing little on php programing. I am assembling a module for my member which is basically cut and paste existing code section of...
1
2513
by: paulq182 | last post by:
PLEASE HELP ME WITH MY CODE?? import java.sql.*; import java.io.*; class min_filmdb_rel_mysql { public static void main (String args ) throws SQLException, IOException {
3
7683
by: Joshepmichel | last post by:
Please to help me to following problem I want to do this 1. create Table Name MEMBER on the Database Name "mytestdb", 2. Add the Values to the Table through the Key board Inputs during running...
6
3927
by: Geoff Cox | last post by:
Hello, at the moment I can add the combined date and time into MySQL using php $dt1 = date("Y-m-d H:i:s"); is it possible to add the date and time separately? I thought it might be
0
7367
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
7430
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5673
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,...
1
5072
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...
0
4743
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...
0
3230
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...
0
1581
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 ...
1
790
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
451
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...

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.