A
Angela
Hey,
I have a column with date as m/d/yyyy format
When I use format([datecolumn],"dd/mm/yyyy")
For 1/12/2009 it changes to 01/12/2009
For 1/10/2009 it changes to 01/10/2009
For 2/3/2009 it changes to 02/03/2009
For 3/2/2009 it changes to 03/02/2009
For 1/13/2009 it changes to 13/01/2009
For 12/17/2009 it changes to 17/12/2009
For 12/10/2009 it changes to 12/10//2009
As you can see, the month is before first forward slash "/". It can be
"m" or "mm" but not more than 12 since there are only12 months.
The date is between first & second "/" which is "d" or "dd".
Well the way I see it, if we can count the value before 1st "/" and
if its single, we can add a zero "0" to it to.. like for all digits
below 10 to make it a valid month in "mm" format.
Same goes for the value count between two "/" to make it a valid "dd".
The total would be 2/2/4 = 10 (2 values each, a slash, 2values,
aslash, 4 values)
Example 2/3/2009 would be come 02/03/2009.
Ofcourse then we can swap the two mid values from the figure to left &
the left one to the mid to get the required.
Example 02/03/2009 is actually February 03, 2009 which we can make
03/02/2009 using combination of left,right & mid function on
02/03/2009.
I would appreciate if someone can put this into a code.
I have a column with date as m/d/yyyy format
When I use format([datecolumn],"dd/mm/yyyy")
For 1/12/2009 it changes to 01/12/2009
For 1/10/2009 it changes to 01/10/2009
For 2/3/2009 it changes to 02/03/2009
For 3/2/2009 it changes to 03/02/2009
For 1/13/2009 it changes to 13/01/2009
For 12/17/2009 it changes to 17/12/2009
For 12/10/2009 it changes to 12/10//2009
As you can see, the month is before first forward slash "/". It can be
"m" or "mm" but not more than 12 since there are only12 months.
The date is between first & second "/" which is "d" or "dd".
Well the way I see it, if we can count the value before 1st "/" and
if its single, we can add a zero "0" to it to.. like for all digits
below 10 to make it a valid month in "mm" format.
Same goes for the value count between two "/" to make it a valid "dd".
The total would be 2/2/4 = 10 (2 values each, a slash, 2values,
aslash, 4 values)
Example 2/3/2009 would be come 02/03/2009.
Ofcourse then we can swap the two mid values from the figure to left &
the left one to the mid to get the required.
Example 02/03/2009 is actually February 03, 2009 which we can make
03/02/2009 using combination of left,right & mid function on
02/03/2009.
I would appreciate if someone can put this into a code.