List Info

Thread: Re: How to get Report Date Format




Re: How to get Report Date Format
country flaguser name
United States
2007-08-23 21:40:23

mcnealysm,

I am trying to determine the date format of report. Not the date
format of the API to request the date.

For example:

I issue a basicReport request for an Excel CSV
addReportRequestWithAccountAggregation of the the past week which
gives me a reportID.
I ask for the URL of the report with the given reportID.
I download the data found at the URL.
Unzip it.
Read the report.

It is the dates in the date column that very depending on the market
of the master account (so it seems). It also varies in the header
(Date Range) of the report.

In the header of the report where the market is AU, the date range is
formated as dd/mm/yyyy and the data in the date column is dd/mm/yy.

For the header of the report where the market is EU, the date range is
formated as dd-MMM-yyyy and the date column is dd/mm/yy.

For the US market the header is MMM dd, yyyy and the data column is
mm/dd/yy.

Based on this I can deduce the format, however it's a "hack". There
should be a clean way of determining this through the API.

-CF

--- In yws-searchmarketing%40yahoogroups.com">yws-searchmarketingyahoogroups.com, "mcnealysm"
<mcnealysm...> wrote:
&gt;
> The format is always mm/dd/yyyy from API perspective. If you are
> seeing something different, please post your XML with the credentials
> masked.
>
> -mcnealysm
>
> --- In yws-searchmarketing%40yahoogroups.com">yws-searchmarketingyahoogroups.com, "ChronoFish";
> <yahoogroup> wrote:
&gt; >
>; > I've found that most of my reports that I'm accessing are in US date
>; > format (mm/dd/yy), however I have a few European accounts where the
> > date format is dd/mm/yy. This threw me for a loop as one can
> imagine.
> >
> > So my question is this: Is there a way to determine the format of
> the
> > date?
&gt; >
> > It seems to be tied to market and not timezone, as in one example
> the
> > master account is set to GMT-7:00 (US mountain time).
&gt; >
> > I know I can get MasterAccount details to determine the Market, but
> > getting Market details does not specify the date format.
> >
> > programmatically there is no way to tell just by inspection (i.e.
&gt; > 01/02/07 would be Jan 2, 2007 in the US and February 1 in the UK).
>; >
> > Thanks,
> > CF
> >
>;

__._,_.___
.

__,_._,___
Re: How to get Report Date Format
country flaguser name
United States
2007-08-23 22:56:35

Can java.text.DateFormat.getDateInstance(SHORT, Locale) be used to
obtain a DateFormat instance to parse the date, if the market ID can
derive the Locale?

--- In yws-searchmarketing%40yahoogroups.com">yws-searchmarketingyahoogroups.com, "ChronoFish";
<yahoogroup...> wrote:
&gt;
> mcnealysm,
>
> I am trying to determine the date format of report. Not the date
>; format of the API to request the date.
&gt;
> For example:
>
> I issue a basicReport request for an Excel CSV
> addReportRequestWithAccountAggregation of the the past week which
&gt; gives me a reportID.
> I ask for the URL of the report with the given reportID.
> I download the data found at the URL.
>; Unzip it.
> Read the report.
>
> It is the dates in the date column that very depending on the market
&gt; of the master account (so it seems). It also varies in the header
&gt; (Date Range) of the report.
>
> In the header of the report where the market is AU, the date range is
> formated as dd/mm/yyyy and the data in the date column is dd/mm/yy.
>
> For the header of the report where the market is EU, the date range is
> formated as dd-MMM-yyyy and the date column is dd/mm/yy.
>
> For the US market the header is MMM dd, yyyy and the data column is
> mm/dd/yy.
>
> Based on this I can deduce the format, however it's a "hack". There
&gt; should be a clean way of determining this through the API.
>;
> -CF
>
>
> --- In yws-searchmarketing%40yahoogroups.com">yws-searchmarketingyahoogroups.com, "mcnealysm"
> <mcnealysm> wrote:
&gt; >
>; > The format is always mm/dd/yyyy from API perspective. If you are
> > seeing something different, please post your XML with the credentials
> > masked.
> >
> > -mcnealysm
> >
> > --- In yws-searchmarketing%40yahoogroups.com">yws-searchmarketingyahoogroups.com, "ChronoFish";
> > <yahoogroup> wrote:
&gt; > >
>; > > I've found that most of my reports that I'm accessing are in US date
>; > > format (mm/dd/yy), however I have a few European accounts where the
> > > date format is dd/mm/yy. This threw me for a loop as one can
> > imagine.
> > >
> > > So my question is this: Is there a way to determine the format of
> > the
> > > date?
&gt; > >
> > > It seems to be tied to market and not timezone, as in one example
> > the
> > > master account is set to GMT-7:00 (US mountain time).
&gt; > >
> > > I know I can get MasterAccount details to determine the Market, but
> > > getting Market details does not specify the date format.
> > >
> > > programmatically there is no way to tell just by inspection (i.e.
&gt; > > 01/02/07 would be Jan 2, 2007 in the US and February 1 in the UK).
>; > >
> > > Thanks,
> > > CF
> > >
>; >
>;

__._,_.___
Recent Activity
Visit Your Group
Search Ads

Get new customers.

List your web site

in Yahoo! Search.

Share Photos

Put your favorite

photos and

more online.

Find Enlightenment

Yoga groups and

resources on

Yahoo! Groups.

Re: How to get Report Date Format
country flaguser name
United States
2007-08-23 23:43:16

I've just tested that for all market ids in this list
http://searchmarketing.yahoo.com/developer/docs/V2/reference/constants/m
arkets.php
.

The snippet here :

--------->8----------
String[] markets = {
"AT&quot;,
"AU&quot;,
"BR&quot;,
"CH&quot;,
"DE&quot;,
"DK&quot;,
"ES&quot;,
"FI&quot;,
"FR&quot;,
"HK&quot;,
"IT&quot;,
"JP&quot;,
"KR&quot;,
"NL&quot;,
"NO&quot;,
"SE&quot;,
"TW&quot;,
"UK&quot;,
"US&quot;,
"EU&quot;
};

for (int i = 0; i < markets.length; i++) {
Locale l = new Locale(&quot;en", markets[i]);
SimpleDateFormat df = (SimpleDateFormat)
SimpleDateFormat.getDateInstance(DateFormat.SHORT, l);
System.out.println(l + " " + df.format(new Date()) + " "
&#43;df.toPattern());
}
-----------8<-----------

Output:

en_AT 8/24/07 M/d/yy
en_AU 24/08/07 d/MM/yy
en_BR 8/24/07 M/d/yy
en_CH 8/24/07 M/d/yy
en_DE 8/24/07 M/d/yy
en_DK 8/24/07 M/d/yy
en_ES 8/24/07 M/d/yy
en_FI 8/24/07 M/d/yy
en_FR 8/24/07 M/d/yy
en_HK 8/24/07 M/d/yy
en_IT 8/24/07 M/d/yy
en_JP 8/24/07 M/d/yy
en_KR 8/24/07 M/d/yy
en_NL 8/24/07 M/d/yy
en_NO 8/24/07 M/d/yy
en_SE 8/24/07 M/d/yy
en_TW 8/24/07 M/d/yy
en_UK 8/24/07 M/d/yy
en_US 8/24/07 M/d/yy
en_EU 8/24/07 M/d/yy (not exist in the market list, but I add it
anyway...)

As you can see, only the AU one gave the d/MM/yy format and all the rest
are M/d/yy.

Is that what you want?

--- In yws-searchmarketing%40yahoogroups.com">yws-searchmarketingyahoogroups.com, "ChronoFish";
<yahoogroup...> wrote:
&gt;
> mcnealysm,
>
&gt; I am trying to determine the date format of report. Not the date
>; format of the API to request the date.
&gt;
> For example:
>
>; I issue a basicReport request for an Excel CSV
> addReportRequestWithAccountAggregation of the the past week which
&gt; gives me a reportID.
> I ask for the URL of the report with the given reportID.
> I download the data found at the URL.
>; Unzip it.
> Read the report.
>
> It is the dates in the date column that very depending on the market
&gt; of the master account (so it seems). It also varies in the header
&gt; (Date Range) of the report.
>
> In the header of the report where the market is AU, the date range is
> formated as dd/mm/yyyy and the data in the date column is dd/mm/yy.
>
&gt; For the header of the report where the market is EU, the date range is
> formated as dd-MMM-yyyy and the date column is dd/mm/yy.
>
&gt; For the US market the header is MMM dd, yyyy and the data column is
> mm/dd/yy.
>
&gt; Based on this I can deduce the format, however it's a "hack". There
&gt; should be a clean way of determining this through the API.
>;
> -CF
>
>
&gt; --- In yws-searchmarketing%40yahoogroups.com">yws-searchmarketingyahoogroups.com, "mcnealysm"
> mcnealysm wrote:
&gt; >
>; > The format is always mm/dd/yyyy from API perspective. If you are
> > seeing something different, please post your XML with the
credentials
&gt; > masked.
> >
>; > -mcnealysm
> >
>; > --- In yws-searchmarketing%40yahoogroups.com">yws-searchmarketingyahoogroups.com, "ChronoFish";
> > <yahoogroup> wrote:
&gt; > >
>; > > I've found that most of my reports that I'm accessing are in US
date
> > > format (mm/dd/yy), however I have a few European accounts where
the
> > > date format is dd/mm/yy. This threw me for a loop as one can
> > imagine.
> > >
>; > > So my question is this: Is there a way to determine the format of
> > the
> > > date?
&gt; > >
>; > > It seems to be tied to market and not timezone, as in one example
> > the
> > > master account is set to GMT-7:00 (US mountain time).
&gt; > >
>; > > I know I can get MasterAccount details to determine the Market,
but
> > > getting Market details does not specify the date format.
> > >
>; > > programmatically there is no way to tell just by inspection (i.e.
&gt; > > 01/02/07 would be Jan 2, 2007 in the US and February 1 in the UK).
>; > >
>; > > Thanks,
> > > CF
> > >
>; >
>;

__._,_.___
Recent Activity
Visit Your Group
Endurance Zone

on Yahoo! Groups

Groups about

better endurance.

Yoga Groups

Find Enlightenment

&amp; exchange insights

with other members

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )