Datetime datatype in sybperl 
Author Message
 Datetime datatype in sybperl

Hello

        I`m just completing a www database interface using sybperl::DBlib,
and could use some help. I have a few smalldate attributes I want to
update and outpui. So, what I need to know is what datatype this field
becomes when I return it from a query, and how I need to decode and format
on the way to and from the database. Any help would be very welcoom!

Please reply by mail

Regards,

 - Per Fredrik Kvarme



Fri, 25 Feb 2000 03:00:00 GMT  
 Datetime datatype in sybperl

Quote:

> Hello

>         I`m just completing a www database interface using sybperl::DBlib,
> and could use some help. I have a few smalldate attributes I want to
> update and outpui. So, what I need to know is what datatype this field
> becomes when I return it from a query, and how I need to decode and format
> on the way to and from the database. Any help would be very welcoom!

You have two possibilities.

1) Sybperl returns dates as a string ('Sep 8 1997  7:33AM' is what
   I get here, but it is locale dependant).

2) Use the 'UseDateTime' attribute to return the date as a native
   datetime object. Then when you print the item you get a date string,
   but you can also do arithmetic on the date (ie add/substract days),
   do date comparisons, and split out all the pieces of the date into
   variables, so that you can format your own date string.

Please read the sybperl manual page for more info on this.

Michael
--
Michael Peppler       -||-  Data Migrations Inc.



Fri, 25 Feb 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Datetime datatype in sybperl

2. sybperl DATETIME Handle ?

3. Am I doing this wrong? Why does this seem so clumsy (time, datetime vs. DateTime)

4. ANNOUNCE:: DateTime::Precise 0.03

5. Newbie Question: Using library methods with ActivePerl (DateTime)

6. ANNOUNCE: DateTime.pm v1.4

7. DateTime::Precise

8. Win32::ODBC insert datetime data into Access DB

9. DateTime -> UnixTime

10. Datetime manipulation in perl

11. Convert UNIX Timestamp to DateTime

12. ANNOUNCE:: DateTime::Precise 0.03

 

 
Powered by phpBB® Forum Software