DateTime in the device's format

How can i get the date and the time in the same format as the device format? When i change the device format i want to get the date in the new format.