Custom License field storing weird date valueSolved

Hi,

I am trying to implement a datetime custom field named "subscription_expires" to store the expiration date of my software. I've followed the tutorials correctly as far as I believe, but for some very weird reason it seems to save the correct time value but not the date, e.g. 0009-09-10 11:30:36.

In my web app I have this code:

string resp = LimeLM.GeneratePKeys(PaymentSettings.LimeLM_VersionID, 1, quantity, email, new string[] { "subscription_expires" }, new string[] { DateTime.Now.AddYears(1).ToString() });

So I am trying to add one year to the current date. I inspected server date and it is correct, I inspected the post string from the PostRequest function and this is what I got:

method=limelm.pkey.generate&version_id=6011&num_keys=1&num_acts=1&email=it-buyer%40clinbay.com&feature_name[]=subscription_expires&feature_value[]=03%2f04%2f2020&api_key=<replaced>

So it is posting the correct date, but in the LimeLM dashboard under the License fields section of my generated product key, the date appears as 0009-09-10 11:30:36.

Why is this happening?

To clarify, the post string is missing the time value because I was doing some other testing without the time. My problem still stands.

That date is not valid. "03:04:2020" is non-standard. Humans *might* be able to parse what you mean (March 4th or April 3rd, year 2020), but computers will not. Hence the format specified in the documentation:

https://wyday.com/limelm/help/license-features/#add-new-types

YYYY-MM-DD hh:mm:ss

I've now specified the date using that format, but now I am getting the value "0004-04-07 06:27:19" in my custom field.

My post string looks like this now:

feature_name[]=Data+Export&feature_name[]=subscription_expires&feature_value[]=1&feature_value[]=YYYY-04-DD+06%3a27%3a19

My code looks like this:

string resp = GeneratePKeys(PaymentSettings.LimeLM_VersionID, 1, quantity, email, new string[] { Feature, "subscription_expires" }, new string[] { "1", DateTime.Now.AddYears(1).ToString("YYYY-MM-DD hh:mm:ss") });

I figured it out. I needed to use the format "yyyy-MM-dd hh:mm:ss".

Now the custom field has the correct date.