PowerBuilder Format Datetime

In PowerBuilder, you can use a variety of format strings to display date values as strings. Here’s a list of commonly used format strings:

  • “MM/dd/yyyy”: Displays the month, day, and year in the format “mm/dd/yyyy”, with leading zeros for single-digit months and days.
  • “dd/MM/yyyy”: Displays the day, month, and year in the format “dd/mm/yyyy”, with leading zeros for single-digit days and months.
  • “yyyy-MM-dd”: Displays the year, month, and day in the format “yyyy-mm-dd”.
  • “MM/dd/yyyy hh:mm:ss tt”: Displays the month, day, year, and time in the format “mm/dd/yyyy hh:mm:ss AM/PM”, with leading zeros for single-digit months, days, hours, minutes, and seconds.
  • “MMM dd, yyyy”: Displays the month name, day, and year in the format “MMM dd, yyyy”.
  • “MMMM dd, yyyy”: Displays the full month name, day, and year in the format “MMMM dd, yyyy”.
  • “dd-MMM-yyyy”: Displays the day, month abbreviation, and year in the format “dd-MMM-yyyy”.
  • “yyyy/MM/dd”: Displays the year, month, and day in the format “yyyy/mm/dd”.

These are just a few examples of the many format strings you can use to display date values as strings. You can adjust the format string to display the date in different formats, depending on your needs.

You can use the String() function to convert a date value to a string. Here’s an example:

you can use the Date() function to convert a string value to a date. Here’s an example:

Good Luck!

Was this article helpful?

Related Articles

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments