Hi @RKarunarathne51
var machineTime = DateTime.Now;
var machineTimeUtc = DateTime.UtcNow;
var instanceTime = PXTimeZoneInfo.Now;
var instanceTimeUtc = PXTimeZoneInfo.UtcNow;
Here are multiple options you can use to get the time depending on your use case.
Make sure you understand the difference between server (machine) time and instance (Acumatica) time. It isn’t exactly the same thing (for me they are different most of the time).
I’d also want to stress again what Daryl said before - we are creating Audit fields for that reason in DACs. If you are using your custom DAC, take a look at a standard one (most of Acumatica’s DACs have these audit fields). What you ask sounds exactly like CreatedDateTime.
If you use your custom DAC, I’d urge you to add the full set of audit fields, to avoid stumbling upon issues each time they are required, but not added.