|
List Info
Thread: Re: How to get Report Date Format
|
|
| Re: How to get Report Date Format |
  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-searchmarketing yahoogroups.com, "mcnealysm"
<mcnealysm ...> wrote:
>
> 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-searchmarketing yahoogroups.com, "ChronoFish"
> <yahoogroup > wrote:
> >
> > 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?
> >
> > 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).
> >
> > 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.
> > 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 |
  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-searchmarketing yahoogroups.com, "ChronoFish"
<yahoogroup ...> wrote:
>
> 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-searchmarketing yahoogroups.com, "mcnealysm"
> <mcnealysm > wrote:
> >
> > 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-searchmarketing yahoogroups.com, "ChronoFish"
> > <yahoogroup > wrote:
> > >
> > > 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?
> > >
> > > 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).
> > >
> > > 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.
> > > 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 |
  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",
"AU",
"BR",
"CH",
"DE",
"DK",
"ES",
"FI",
"FR",
"HK",
"IT",
"JP",
"KR",
"NL",
"NO",
"SE",
"TW",
"UK",
"US",
"EU"
};
for (int i = 0; i < markets.length; i++) {
Locale l = new Locale("en", markets[i]);
SimpleDateFormat df = (SimpleDateFormat)
SimpleDateFormat.getDateInstance(DateFormat.SHORT, l);
System.out.println(l + " " + df.format(new Date()) + " "
+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-searchmarketing yahoogroups.com, "ChronoFish"
<yahoogroup ...> wrote:
>
> 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-searchmarketing yahoogroups.com, "mcnealysm"
> mcnealysm wrote:
> >
> > 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-searchmarketing yahoogroups.com, "ChronoFish"
> > <yahoogroup > wrote:
> > >
> > > 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?
> > >
> > > 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).
> > >
> > > 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.
> > > 01/02/07 would be Jan 2, 2007 in the US and February 1 in the UK).
> > >
> > > Thanks,
> > > CF
> > >
> >
>
__._,_.___
|
[1-3]
|
|