How do I change the default time that appgini assign by default?

Got something cool to share with AppGini users? Feel free to post it here!
Post Reply
nycwebmaster
Veteran Member
Posts: 83
Joined: 2015-11-23 01:02

How do I change the default time that appgini assign by default?

Post by nycwebmaster » 2016-09-29 13:20

Hi,

I have a table that I am listing some events. Sometimes we don't know the starting time so we erase the content of the field and when I save that record the event starting time defaults back to 7:00 PM and I would like to leave that field blank if I don't know at what time the event starts. How do I clear that default or even some times default to a preset time that I assing. But I need to know mostly how to leave it blank for now.


Thanks,

AhmedBR
Veteran Member
Posts: 194
Joined: 2013-09-19 10:23

Re: How do I change the default time that appgini assign by default?

Post by AhmedBR » 2016-10-01 01:38

I had a similar problema this is how I do it:
I just update the field with NULL based on a condition.

Something like:
Update tablename set Time = Null where Started <> 'Yes'

nycwebmaster
Veteran Member
Posts: 83
Joined: 2015-11-23 01:02

Re: How do I change the default time that appgini assign by default?

Post by nycwebmaster » 2016-10-03 22:01

SOLVED
An it was way too easy you just change the default format into the default text of the field. In my case was 1:00 Am so I put the default text for that field was: 01:00:00 and that took care of the problem. Hope this answers many people asking for this.

thecomputerchap
Veteran Member
Posts: 42
Joined: 2016-08-28 10:37

Re: How do I change the default time that appgini assign by default?

Post by thecomputerchap » 2016-11-22 08:51

nycwebmaster please can you expand a little on this with some code examples as I'm completely stuck! Thanks! :)

udennison
Posts: 11
Joined: 2019-10-12 17:34
Location: Trinidad & Tobago

Re: How do I change the default time that appgini assign by default?

Post by udennison » 2021-03-12 13:55

AppGiniTimeDefault.JPG
AppGiniTimeDefault.JPG (20.23 KiB) Viewed 390 times

pfrumkin
Veteran Member
Posts: 119
Joined: 2020-02-18 17:58
Location: Albuquerque, New Mexico USA

Re: How do I change the default time that appgini assign by default?

Post by pfrumkin » 2021-03-12 19:23

Maybe I am not understanding. You can put in a time in that Default box. I just created a new column of type Time and that Default was blank.

~Paul

udennison
Posts: 11
Joined: 2019-10-12 17:34
Location: Trinidad & Tobago

Re: How do I change the default time that appgini assign by default?

Post by udennison » 2021-03-13 01:58

Yes, I couldn't believe it was that easy myself.
Just put the default time you want as shown in the image in the Default textbox.

Post Reply