Date/Time Properties in Ruby

This is an example that generally applies to all methods/properties in the Chilkat API’s that return a date/time (for the Ruby programming language)

sysTime = Chilkat::SYSTEMTIME.new()

# Get the last-mod date/time
fileObj.GetLastModifiedTime(sysTime)
lastModTime = sysTime.wMonth.to_s()
lastModTime = lastModTime + "/" + sysTime.wDay.to_s()
lastModTime = lastModTime + "/" + sysTime.wYear.to_s()
lastModTime = lastModTime + " " + sysTime.wHour.to_s()
lastModTime = lastModTime + ":" + sysTime.wMinute.to_s()
lastModTime = lastModTime + ":" + sysTime.wSecond.to_s()
Tags :