Date format with Foxpro 
Author Message
 Date format with Foxpro

hi all,

i'm using DBD::XBase to access DBF files.

In a table i have a 'date' field, and, in a "select" query i want it to
return only the year and month...something like this :

Select distinct to_char(TheDate, 'YYYYMM') from Planning;  ( works with
Oracle...)

is there anybody to give me the rigth syntax ? or is the DBD::XBase unable
to do this ?

Thanks everybody

Eric



Sat, 01 Dec 2001 03:00:00 GMT  
 Date format with Foxpro

Quote:

> hi all,

> i'm using DBD::XBase to access DBF files.

> In a table i have a 'date' field, and, in a "select" query i want it to
> return only the year and month...something like this :

> Select distinct to_char(TheDate, 'YYYYMM') from Planning;  ( works with
> Oracle...)

> is there anybody to give me the rigth syntax ? or is the DBD::XBase unable
> to do this ?

I doubt if you can do this straigntforwardly - you will need to get the
date out in whatever format it comes as and then manipulate it later.

/J\
--
"Pat was wondering if he could put his massive tool in my box" - Mrs
Doyle, Father Ted



Sat, 01 Dec 2001 03:00:00 GMT  
 Date format with Foxpro

Quote:


>> hi all,

>> i'm using DBD::XBase to access DBF files.

>> In a table i have a 'date' field, and, in a "select" query i want it to
>> return only the year and month...something like this :

>> Select distinct to_char(TheDate, 'YYYYMM') from Planning;  ( works with
>> Oracle...)

>> is there anybody to give me the rigth syntax ? or is the DBD::XBase unable
>> to do this ?

> I doubt if you can do this straigntforwardly - you will need to get the
> date out in whatever format it comes as and then manipulate it later.

This is also mentioned in the XBase FAQ :

  <http://www.fi.muni.cz/~adelton/perl/man3/XBase::FAQ.html>

/J\
--
"William Hague, the world's favourite hairline" - Rory Bremner



Sat, 01 Dec 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. FoxPro (2.6) database from PERL AND real FoxPro apps

2. converting date format to unix time format?

3. Where are the Date::Parse and Date::Format pm's located

4. How to date/time convert to numeric date format in DOS perl

5. date string to date format

6. date::parse & date::format

7. where can I find module Date::Format and Date::parse

8. Formatting Dates (Searching for date + 30)

9. Conflict with Tk::Date and Date::Format?

10. Bug in Date::Format? (week number)

11. Where is Date::Format

12. time format with date::manip

 

 
Powered by phpBB® Forum Software