Drupal CCK date field with just hours and minutes - drupal

How can I create a date field in Drupal just with hours and minutes without years and months?

You should be able to change the granularity when you create the cck field.
Jut select what you need from that Granularity options.
You can also just format the date by creating a new format:
Click on the date and time date format page and then create a new format that looks like this:
h:i
That's the time and date
Select that format for display.
You can go to the following site to see more Date format string options:
http://us3.php.net/manual/en/function.date.php

This should also help, http://drupal.org/node/134144#comment-1982750
how to add your own formats
set time only or set any php date setting you want

Related

2 return formats for ACF Time & Date Picker

I have a site build with several different variations of time and date throughout the site as well as a format needed for outputting to a calendar export file for Gmail/Outlook/iCal. I'd like to only use one field, the combo date and time picker, but I can't get it to work for all the custom formats. Is there any way to have more than one return format?
If I could have a Ymd and a Y/m/d H:i that would cover everything.

How to set a date for WKInterfaceDate

Can WKInterfaceDate show a date & time different from the current values?
If yes, how can I set a different date?
apple documentation says:
A WKInterfaceDate object is a custom label that displays the current
date or time. Use this object when you want to display date or time
information without further interaction from your WatchKit extension.
At runtime, use the date object to configure the appearance of the
date and time information being displayed.
For different date you can simply create label and set it's text to a String that you create with NSDateFormatter out of some NSDate.

Drupal - Mandatory CCK date and time field - Only date is mandatory

I have a CCK field of date and time. The widget type is 'Text Field with Date Pop-up calendar'. The field is mandatory.
The date works fine, but if you leave the time blank (hours and minutes), the node can be created and the time field reads '(All day)'. How can I make it mandatory to specify a time in hours and minutes?
Thanks
Try using datestamp instead of datetime:
"[datestamp] must be filled with a complete date -- year, month, day, hour, minute, second, so you sometimes have to arbitrarily set some of these values even if they are not applicable."
http://drupal.org/node/262066
In the date settings you have granularity, I think selecting hours and minutes there might solve your problem.

Drupal 6: Date module and displaying only DATE value, without TIME

I'm a newbie drupal guy,
I use http://drupal.org/project/date module for my events date, but this module displays TIME as well as default, and I can't turn that off from configuration pages unless I'm a blind :/ is there any way to display only DATE value?
Appreciate helps!! thanks a lot!
You need to add a new date and time format that only specifies the date portion under Administer › Site configuration › Date and time › Formats › Add format (the relative path is /admin/settings/date-time/formats/add).
Here are a couple of popular date formats strings according to the PHP date format characters:
m/d/Y becomes 06/22/2010
l, F j, Y becomes Tuesday, June 22, 2010
You can either set one of the three default format types (i.e. long, medium, or short) to use your custom format or you can add a new format type. In either case, you would just need to specify the date field to use the format type that is set to your custom date format.
See Display multiple Date formats, along with Theme the Date and Example - Theme all-day events without a time for more information on this (while the last two links are targeting Drupal 5, they still apply for Drupal 6, AFAIK).

How to store and display date in dd-mm-yy format in Joomla?

I am developing a component in Joomla. Through my component I want to store timestamp to "lastaccessed" field.
My problem is that, if I am simply storing the date, then MySQL is displaying it as "0000-00-00 00:00:00"
I am using the PHP date function like this:
$row->date_lastaccessed=date();
How can I store and retrieve the date in my format (dd-mm-yyyy hh:mm:ss ampm)?
Have you looked at:
http://php.net/manual/en/function.date.php

Resources