Bill Tudor
Bill Tudor

Reputation: 109

Changing Date Format within the concatenate function

I'm using data from two cells and using concatenate to compile them into a string.

The function cell looks something like

=CONCATENATE("",A2,"_",B2,"_AuditD",".csv")

Cell A2 contains a simple string and Cell B2 has a formatted date (yyyymmdd)

But the cell shows

Fort Hill_42108_AuditD.csv

instead of

Fort Hill_20150414_AuditD.csv

Is there any work around?

Thanks

Upvotes: 2

Views: 706

Answers (1)

JNevill
JNevill

Reputation: 50019

You can use the TEXT() formula to format a date into a string. In your formula it would look like:

=CONCATENATE("",A2,"_",TEXT(B2, "YYYYMMDD"),"_AuditD",".csv")

Upvotes: 4

Related Questions