Skip to content

Commit a90ceac

Browse files
authored
Use getPrintableDateTime for name in AddCustomAudience (#411)
1 parent 511fec7 commit a90ceac

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

google-ads-examples/src/main/java/com/google/ads/googleads/examples/remarketing/AddCustomAudience.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
package com.google.ads.googleads.examples.remarketing;
1616

17+
import static com.google.ads.googleads.examples.utils.CodeSampleHelper.getPrintableDateTime;
18+
1719
import com.beust.jcommander.Parameter;
1820
import com.google.ads.googleads.examples.utils.ArgumentNames;
1921
import com.google.ads.googleads.examples.utils.CodeSampleParams;
@@ -89,7 +91,7 @@ private void runExample(GoogleAdsClient googleAdsClient, long customerId) {
8991
// Creates a CustomAudience object to represent the new audience.
9092
CustomAudience customAudience =
9193
CustomAudience.newBuilder()
92-
.setName("Example CustomAudience #" + System.currentTimeMillis())
94+
.setName("Example CustomAudience #" + getPrintableDateTime())
9395
.setDescription("Custom audiences who have searched specific terms on Google Search")
9496
// Matches customers by what they searched on Google Search.
9597
// Note: "INTEREST" OR "PURCHASE_INTENT" is not allowed for the type field

0 commit comments

Comments
 (0)