Displaying a date format in the DRW

by frontpage



Displaying a date format in the DRW…

This example was submitted by Hisham Hammash

The Question is: How to display date in the DRW as dd/mm/yyyy?
Answer:
We will use an example with a Database Called Staff and Table called StaffInfo. The table has the following fields. StaffName, Salary, DateJoined.

Now we want to create a DRW to display all these information, but with DateJoined as dd/mm/yyyy instead of mm/dd/yyyy.

In frontpage
1- Select Insert>Database>Results
2- Select the Database Connection (in our example Staff)
3- Next Step click on Custom Query Button.
4- Insert the following SQL:
Select StaffName,Salary, Fomat(DateJoined,’dd/mm/yyyy’) From StaffInfo
5- Continue the Database results till the end.

Try the page, it will display all date joined as dd/mm/yyy.
Of course you can use yyyy/mm/dd, mm/dd/yyyy, dddd dd,mmmm,yyyy

{ 0 comments… add one now }

Leave a Comment

Previous post:

Next post: