ការ​បម្លែង​តម្លៃ​កាល​បរិច្ឆេទ

អនុគមន៍​ដូច​ខាង​ក្រោម បម្លែង​តម្លៃ​កាល​បរិច្ឆេទ​ទៅ​ជា​ចំនួន​អាច​គណនា​បាន និង​ត្រឡប់​មក​វិញ ។

DateSerial Function

ត្រឡប់​តម្លៃ កាល​បរិច្ឆេទ សម្រាប់​ថ្ងៃ ខែ ឆ្នាំ​ដែល​បាន​បញ្ជាក់ ។

DateValue Function

ត្រឡប់​តម្លៃ​កាល​បរិច្ឆេទ​ពី​ខ្សែ​អក្សរ​កាល​បរិច្ឆេទ ។ ខ្សែ​អក្សរ​បរិច្ឆេទ​គឺ​ជា​កាល​បរិច្ឆេទ​ពេញ​លេញ​ក្នុង​តម្លៃ​លេខ​តែ​មួយ ។ អ្នក​អាច​ប្រើ​លេខ​សម្គាល់​ដើម្បី​កំណត់​ភាព​ខុស​គ្នា​រវាង​កាល​បរិច្ឆេទ​ទាំងពីរ ។

Day Function

ត្រឡប់​តម្លៃ​ដែល​តំណាង​ឲ្យ​ថ្ងៃ​នៃ​ខែ ដែល​ផ្អែក​លើ​លេខ​សម្គាល់​កាល​បរិច្ឆេទ​ដែល​បាន​បង្កើត​ដោយ DateSerialDateValueស ។

Month Function

ត្រឡប់​ខែ​នៃ​ឆ្នាំ​ពី​​​កាល​បរិច្ឆេទតម្លៃ​សម្គាល់​​ ដែល​ត្រូវ​បាន​បង្កើត​ដោយ​អនុគមន៍ DateSerial ឬ DateValue ។

WeekDay Function

ត្រឡប់​លេខ​ដែល​ត្រូវ​គ្នា​ទៅ​នឹង​ថ្ងៃ​ធ្វើការ ដែល​តំណាង​ដោយ​លេខ​សម្គាល់​កាល​បរិច្ឆេទ ដែល​ត្រូវ​បាន​បង្កើត​ដោយ​អនុគមន៍ DateSerial ឬ DateValue ។

Year Function

ត្រឡប់​ឆ្នាំ​ពី​លេខ​សម្គាល់​កាល​បរិច្ឆេទ ដែល​ត្រូវ​បាន​បង្កើត​ដោយ​អនុគមន៍ DateSerial ឬ DateValue ។

CDateToIso Function

Returns the date in ISO format without separators (YYYYMMDD) from a serial date number that is generated by the DateSerial or the DateValue or the CDateFromIso function.

The year part consists of at least four digits, with leading zeros if the absolute value is less than 1000, it can be negative with a leading minus sign if the date passed denotes a year before the common era (BCE) and it can have more than four digits if the absolute value is greater than 9999. The formatted string returned can be in the range "-327680101" to "327671231".

រូប​តំណាង​ចំណាំ

Years less than 100 and greater than 9999 are supported since LibreOffice 5.4.


CDateFromIso Function

Returns the internal date number from a string that contains a date in ISO format (YYYYMMDD or YYYY-MM-DD).

The year part must consist of either two (supported only in YYMMDD format without separators for compatibility) or at least four digits. With four digits leading zeros must be given if the absolute value is less than 1000, it can be negative with a leading minus sign if the date passed denotes a year before the common era (BCE) and it can have more than four digits if the absolute value is greater than 9999. The formatted string can be in the range "-327680101" to "327671231", or "-32768-01-01" to "32767-12-31".

An invalid date results in an error. Year 0 is not accepted, the last day BCE is -0001-12-31 and the next day CE is 0001-01-01. Dates before 1582-10-15 are in the proleptic Gregorian calendar.

រូប​តំណាង​ព័ត៌មាន​ជំនួយ

When converting a date serial number to a printable string, for example for the Print or MsgBox command, the locale's default calendar is used and at that 1582-10-15 cutover date may switch to the Julian calendar, which can result in a different date being displayed than expected. Use the CDateToIso Function to convert such date number to a string representation in the proleptic Gregorian calendar.


រូប​តំណាង​ចំណាំ

The YYYY-MM-DD format with separators is supported since LibreOffice 5.3.4. Years less than 100 or greater than 9999 are accepted since LibreOffice 5.4 if not in VBA compatibility mode.


CDateToUnoDate Function

ត្រឡប់​កាលបរិច្ឆេទ​ជា UNO com.sun.star.util.Date struct.

CDateFromUnoDate Function

បម្លែង UNO com.sun.star.util.Date struct ទៅជា​តម្លៃ​កាលបរិច្ឆេទ។

CDateToUnoDateTime Function

ត្រឡប់​ផ្នែក​ពេលវេលា​របស់​កាលបរិច្ឆេទ​ជា UNO com.sun.star.util.DateTime struct ។

CDateFromUnoDateTime Function

បម្លែង UNO com.sun.star.util.DateTime struct ទៅជា​តម្លៃ​កាលបរិច្ឆេទ។

DateAdd Function

បូក​ចំនួន​ដង​នៃ​ចន្លោះ​ពេល​កាលបរិច្ឆេទ​ទៅ​កាលបរិច្ឆេទ​ដែល​បាន​ផ្ដល់ ហើយ​ត្រឡប់​កាលបរិច្ឆេទ​លទ្ធផល ។

DateDiff Function

ត្រឡប់​ចំនួន​ចន្លោះ​ពេល​កាលបរិច្ឆេទ រវាង​តម្លៃ​កាលបរិច្ឆេទ​ពីរ​ដែល​បាន​ផ្ដល់ ។

DatePart Function

អនុគមន៍ DatePart ត្រឡប់​ផ្នែក​នៃ​កាលបរិច្ឆេទ​ដែលបាន​បញ្ជាក់ ។