This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

HTML alerts - format size display

This should be a simple question.  But... having a little trouble finding the correct resource.

HTML alert showing database size and free space.  By default numeric values display as a long string of numbers. 

Can someone point me to a document detailing how to format this output for something like '1.55 GB' or other?

Screenshot of results and html code posted below.  Thanks in advance for any assistance.

<html>
<head>
<style type="text/css">.tableformat {border: 3px solid #FF7D7D; width: 1080px; border-collapse: collapse; font-family: Verdana; font-size: 10pt; font-weight: bold;}.columnheader {border-bottom: 3px solid #FF7D7D; padding-bottom: 20px; background-color: #FFE0E0} .column25color {background-color: #FFE0E0; width: 25%; text-align: left; padding: 10px; font-weight: bold;}.column25nocolor {width: 25%; text-align: left; padding: 10px; font-weight: bold;} .column75color {background-color: #FFE0E0; width: 75%; text-align: left;padding: 10px; padding-top: 20px; font-weight: bold;} .column75nocolor {width: 75%; text-align: left;padding: 10px; padding-top: 20px; font-weight: bold;} </style>
</head>
<body>
<table class="tableformat">
<tr><th colspan="2" class="columnheader">Database File Size Alert</th></tr>
<tr><td class="column25color">Database Name:</td><td class="column75color">${N=SwisEntity;M=SqlDatabaseFileAlert.DatabaseName}</td></tr>
<tr><td class="column25nocolor">Full Path to DB File:</td><td class="column75nocolor">${N=SwisEntity;M=SqlDatabaseFileAlert.PhysicalName}</td></tr>
<tr><td class="column25color">Database Size:</td><td class="column75color">${N=SwisEntity;M=Database.SqlDatabaseAlert.DatabaseSize}</td></tr>
<tr><td class="column25nocolor">Database Free Space:</td><td class="column75nocolor">${N=SwisEntity;M=Database.SqlDatabaseAlert.DatabaseFreeSpace}</td></tr>
<tr><td class="column25color">Server and Instance Name:</td><td class="column75color">${N=SwisEntity;M=Database.SqlServer.Node.Caption} / ${N=SwisEntity;M=Database.SqlApplicationAlert.InstanceName}</td></tr>
<tr><td class="column25nocolor">Time of Alert:</td><td class="column75nocolor">${N=Alerting;M=AlertTriggerTime;F=DateTime}</td></tr>
</table>
</body>
</html>