+ Start a Discussion
dlutchnerdlutchner 

Date format dd-mm-yyyy turning into mm-dd-yyyy

I am running 6.16pe. In Excel my date is showing in format dd/mm/yyyy however when I upload to S.F. it changes to mm/dd/yyyy. Am I doing something wrong?
 
thanks
jeffstuitjeffstuit
Salesforce uses a different format to store dates than Excel.  You're not going anything wrong, that's just how Salesforce displays dates.  If you want to change the format of your date in Salesforce, you'll need to write a formula to do it.
dlutchnerdlutchner
Thanks for that.
Gareth DaviesGareth Davies

Be carefull


In earlier versions of Excel Connector ( I think it's fixed now but I haven't tried) if you have Eurpean locale Excel (dd/mm/yyyy) if you round trip a date i.e.


Read from Salesforce into Excel


Excel to Salesforce


the date (if before the 12th of the month) can insert into salesforce.com with the days and months reversed. If you then re-round-trip it you will set it back to normal.


See Earlier Post

Watch out.


Gareth.

LiquidJLiquidJ
in the excel connector...i type in 12/18/2007
and when i import it into salesforce  i get 12/30/1899........
 
any help???
 
BrookHartyBrookHarty

I'm not too happy with the date issues in salesforce. I've been copying the dates from excel into a file and running sed on it.

 

cat dates.txt | sed -e "s/ .*//" | sed -e "s/\/\([0-9]\)\//\/0\1\//" | sed  -e "s/^\([0-9 \/]\{9\}\)$/0\1/" | sed 's/\///g' | sed  -e"s_\(..\)\(..\)\(....\)_\3/\2/\1_p" | sed "s/\//\-/g"

 

So it takes 01/04/2008 00:34 chops/converts into 2008-04-01

 

Dont get me started with working with openoffice.org!

 

 

BrookHartyBrookHarty

Or using AWK,Turns “19/04/2007 20:35” into 2007-04-19

 

awk -F "\/" '/ *[0-9]+\/[0-9]+\/[0-9][0-9][0-9][0-9]/ { printf "%04d-%02d-%02d\n",$3,$2,$1 }'

DixitDixit
As far as I know in this year, salesforce shows up the date with the format of your selected language in your profile. 

Change the language and the format should be the same as in your excel. 
Here in México we use dd/mm/yyyy
but when i'm working with english version of salesforce it always changes the date to mm/dd/yyyy 

also you can separate the date in year, month and day and put them in the order you want, whatever it is, try convert every part into a string and change the order.