To associate each virtual machine with a specific cost center, you should assign tags to the virtual machines. Tags allow you to categorize and manage resources in your Azure subscription by applying metadata to them. This makes it easier to organize resources according to different criteria such as cost centers, making cost tracking and management straightforward.
To view the date and time when the resources were created in a resource group within an Azure subscription, you need to navigate to the Deployments section within the Resource Group. Selecting Programmatic Deployment from the Subscriptions blade provides options for initiating programmatic deployments, not for viewing the history of already deployed resources. Therefore, the solution does not meet the goal of viewing the creation date and time of resources in RG1.
To view the date and time when resources were created in a resource group in Azure, you need to navigate to the Resource Group (RG1 in this case) and then check the deployments section. This will show a history of all deployments, including the dates and times when resources were created. Selecting the subscription and clicking on Resource providers in the Subscriptions blade will not provide this information; it only shows the providers registered within the Azure subscription.
To view the date and time when resources were created in a resource group in an Azure subscription, you need to access the deployment history of the resource group. This can be found under the 'Deployments' section in the resource group blade. The 'Automation script' option will not provide the date and time of resource creation. Therefore, the solution of clicking on 'Automation script' does not meet the goal.

