Hi All,
I have a date filed coming from Input as Decimal (13,5) Value : 09092008.39699 , i want this value as date in to the target and i tried as shown below but when i am trying to convert it to date i am getting the followin error
" APT_CombinedOperatorController,3: Data string '20090304' does not match format '%yyyy-%mm-%dd': an integer was expected to match tag %dd. "
My Code Is :
Date = Left(DecimalToString(DATE_OPENED),9)
StringToDate(Trim(date)[5,4] :Trim(date)[1,2]:Trim(date)[3,2],'%yyyy-%mm-%dd')
Please suggest me if i am doing any thing wrong above or any new logic if you guys have , Thanks in advance for your valuble Suggestions.
Thanks,
Kumar
Decimal to Date Conversion
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Just to be picky... that is "UK or US" format... :DSainath.Srinivasan wrote:or use %dd%mm%yyyy or %mm%dd%yyyy format (US or UK) to your source date rather than splitting. ...
But would agree just to use this format rather than trying to remodel, (OP) just make sure you substring for the first 8 characters, not 9 as you have done