rc,

> off topic topic of mysql database....perl
>
> i need to know how to build a linux timestamp from a date given to me in
> the following format 01-18-99 (m-d-y) i am using mysql to store this as an
> int(11).
>
> i know php has a mktime function, does anyone know if perl has something
> similar?


=off topic and off subject - what's all this talk of PHP and Perl on 
[EMAIL PROTECTED]?

1 consider the way the "date given to me" and if you can acquire it in three 
components. If you must continue to
suffer the illogical (US) sequence then next consider how you could rearrange mm-dd-yy 
into the MySQL format of
[cc]yyddmm (int) or [cc]yy-mm-dd (str).

2 thereafter with the date in non-ambiguous format it can be fed into another routine 
that will convert it to a
timestamp (NB UNIX Epoch not "linux")

To save you from developing separate routines in PHP and Perl, consider a single 
solution in SQL:

> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)

step 1: 6.3.2  String Functions
step 2: 6.3.4  Date and Time Functions

=Some people mistakenly think MySQL is only for holding data...

=Regards,
=dn



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to