Hi,
Can some one assist in converting a date from one format to another.
eg:
Input Date : 2009-12-31 ( yyyy-mm-dd) data-type : Date
Output Required : 31-12-2009 ( dd-mm-yyyy) data-type : Date
Regards,
SatishM.
Regarding Date conversion
Moderators: chulett, rschirm, roy
A date is a date, only date values in string fields have formats like you are showing. You can use "[]", the substring operators, to re-arrange the parts of those external dates or the StringToDate / DateToString functions.
Last edited by chulett on Mon Nov 30, 2009 4:39 pm, edited 1 time in total.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 47
- Joined: Thu Dec 09, 2010 4:37 am
Re: Regarding Date conversion
you can convert first date to string then and then again string to datesatishm wrote:Hi,
Can some one assist in converting a date from one format to another.
eg:
Input Date : 2009-12-31 ( yyyy-mm-dd) data-type : Date
Output Required : 31-12-2009 ( dd-mm-yyyy) data-type : Date
Regards,
SatishM.
No reason for anything like that, if both the source and target are a "date" data type as (as noted) there are no format to dates, they are stored internally in binary. Now if only one end or the other is a Date or there are two Strings involved then those functions are the way to go.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers