Since you didn't give us the ARS version and which operating system, my first 
suggestion would be to look up the ARDATE environment variable

Another option would be to string manipulate the date into the format of 
MM/DD/YYYY before putting it into the date time field.

Fred

-----Original Message-----
From: Action Request System discussion list(ARSList) 
[mailto:[email protected]] On Behalf Of Jonas Stumph Stevnsvig
Sent: Tuesday, August 09, 2011 7:54 AM
To: [email protected]
Subject: String to Date

Hi all

I am having a spot of trouble with strings and dates...

I have an import which gives me dates in the following format: yyyyMMDD,
and puts them in a Character field.

I want to parse the date, so i created a setfields action with a value of
((((SUBSTR($ImportedDateCharField$, 6, 7) + "-") +
SUBSTR($ImportedDateCharField$, 4, 5)) + "-") +
SUBSTR($ImportedDateCharField$, 0, 3)) + " 01:00:00"

If this is put in another char field the value displayed is "31-05-2001
01:00:00"
If I put that value in the date field, I get "Tue, 9 Aug, 11 1:33:57 "

But if i hard code the textual value "31-05-2001 01:00:00" in the
date/time field - it works great.

PS I am using the data import tool for the import - I thought I could
define the format in the options pane, but that is apparently only for
displaying - not for parsing date/times ???

I hope someone can see where I am going wrong.

best regards

Jonas Stevnsvig

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug11 www.wwrug.com ARSList: "Where the Answers Are"

Reply via email to