Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
DataDeploy-DATE
System
Hi,
I have a problem while deploying following to field to ORACLE Database with type DATE.
I have a date field like this
<item name="Expiration_Date">
<description>Enter date in MM/DD/YY Format</description>
<text size="8" maxlength="8" >
<default>MM/DD/YY</default>
<cgi-callout url="/iw-bin/iw_cgi_wrapper.cgi/z_calendar.ipl" label="Calendar"
window-features="width=200,height=230,resizable=no,toolbar=no,scrollbars=no,titlebar=no"/>
</text>
</item>
while i am deploy to database it is giving the below error.
Error:
ERROR:data-format attribute is required for column <Expiration_Date>
Column: Expiration_Date, field: Expiration_Date, Index: 8,Converting '05/6/03' to TIMESTAMP
datadeploy config file entry:
<column name="Expiration_Date" data-type="DATE" value-from-field="Expiration_Date" allows-null="no" is-url="no"/>
Thanx in advance
Find more posts tagged with
Comments
Migrateduser
you would need to specify the data-format attribute in your coulumn element
<column name="Expiration_Date" data-format="MM/dd/YY"
data-type="DATE" value-from-field="Expiration_Date" allows-null="no" is-url="no"/>
Migrateduser
Thanx for quick reply. I included data-format="MM/YY/DD"
Now i got the following error:
ERROR
impleDateFormat.parse() could not parse the string '05/13/03' with format
: MM/DD/YY
ERROR:data-format attribute for the column must conform to the format documented
in SimpleDateFormat class
Column: CREATED_DATE, field: Expiration_Date, Index: 10,Converting '05/13/03' to
TIMESTAMP
Thanx
Edited by krishna1288 on 05/22/03 11:54 AM (server time).
Streamstudiolog.docx
Migrateduser
The data-format I gave you was just an example you need to conform to the Date format specified for
D is day in year change it to 'd' same with year
MM/dd/yy
java.text.SimpleDateformat class:
Snippet of SimpleDateFormat class documentation:
Symbol Meaning Presentation Example
------ ------- ------------ -------
G era designator (Text) AD
y year (Number) 1996
M month in year (Text & Number) July & 07
d day in month (Number) 10
h hour in am/pm (1~12) (Number) 12
H hour in day (0~23) (Number) 0
m minute in hour (Number) 30
s second in minute (Number) 55
S millisecond (Number) 978
E day in week (Text) Tuesday
D day in year (Number) 189
F day of week in month (Number) 2 (2nd Wed in July)
w week in year (Number) 27
W week in month (Number) 2
a am/pm marker (Text) PM
k hour in day (1~24) (Number) 24
K hour in am/pm (0~11) (Number) 0
z time zone (Text) Pacific Standard Time
' escape for text (Delimiter)
'' single quote (Literal) '
Migrateduser
Thanx for your info it works for me
Migrateduser
Hi,
I have a container with field name.
Container name is "DealerAuthorization" and subitem name is "DealerAuthorization" so how to define value_from_field?
is this right? or do i need specify container name too
value-from-field="DealerAuthorization"
container like this
<container name="DealerAuthorization">
<item name ="DealerAuthorization" rowcontinue="t">
<radio>
<option label="All Products" value="1"/>
<option label="Wish List and Contract" value="2"/>
<option selected="t" label="Contract Only" value="3"/>
</radio>
</item>
</container>
Thanx
Migrateduser
Refer to the templating example category internet/yacht:
Container name is General Info:
Datacapture.cfg:
--------------------
<container name="General Info" combination="and">^
<item name="Boat Manufacturer" rowcontinue="t">^
<database data-type="VARCHAR(40)" />^M
<text required="t" maxlength="40" />^M
</item>^M
DD.cfg
--------
<column name="Boat_Manufacturer" data-type="VARCHAR(40)" allows-null="n
o" is-url="no" value-from-field="General Info/0/Boat Manufacturer" />
<column name="Boat_Model" data-type="VARCHAR(40)" allows-null="no" is-u
rl="no" value-from-field="General Info/0/Boat Model" />
<column name="Length" data-type="SMALLINT" allows-null="no" is-url="no"
value-from-field="General Info/0/Length" />
<column name="Rig" data-type="CHAR(6)" allows-null="no" is-url="no" val
ue-from-field="General Info/0/Rig" />
Adam Stoller
I'd suggest changing the element names to be distinct and use labels if you want to make them appear to be the same
<container name="DealerAuthorization">
<item name="dauth" rowcontinue="t">
<label>DealerAuthorization</label>
....
</item>
....
</container>
It makes things far less confusing when trying to parse the input and make associations between fields and columns.
--fish
(Interwoven Senior Technical Consultant)