How do I format a date in a formula result?

lhazou

New Member
Joined
Aug 20, 2002
Messages
11
I'm using the below formula:
=IF(J10="n",(CONCATENATE("id",J21,"_promo",J5,"_front_",L6,".jpg")),"")

In the result, I would like what L6 is to be formatted the same way as L6.

The formula returns:
id49_promoJockeyB2G1Bras_front_38986.jpg
What I would like it to return is:
id49_promoJockeyB2G1Bras_front_200600926.jpg

So how do I put in my formula how I want a number to be formatted?
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

Von Pookie

MrExcel MVP
Joined
Feb 17, 2002
Messages
13,686
Use the TEXT function:

=IF(J10="n",(CONCATENATE("id",J21,"_promo",J5,"_front_",TEXT(L6,"yyyymmdd"),".jpg")),"")
 

onlyadrafter

Well-known Member
Joined
Aug 19, 2003
Messages
5,703
Platform
  1. Windows
Hello

try

=IF(J10="n",(CONCATENATE("id",J21,"_promo",J5,"_front_",text(L6,"yyyymmdd"),".jpg")),"")
 

Forum statistics

Threads
1,175,733
Messages
5,899,161
Members
434,750
Latest member
XLPandit

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top